mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-30 10:56:56 +08:00
Exported EchoVault interface now onlu contains the keyspace methods. All other methods are private. Private methods are accessed using the reflect package in the test folder
This commit is contained in:
@@ -21,7 +21,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/echovault/echovault/pkg/constants"
|
||||
"github.com/echovault/echovault/pkg/types"
|
||||
"io"
|
||||
"log"
|
||||
"math/big"
|
||||
@@ -129,7 +128,7 @@ func GetIPAddress() (string, error) {
|
||||
return localAddr, nil
|
||||
}
|
||||
|
||||
func GetSubCommand(command types.Command, cmd []string) interface{} {
|
||||
func GetSubCommand(command Command, cmd []string) interface{} {
|
||||
if len(command.SubCommands) == 0 || len(cmd) < 2 {
|
||||
return nil
|
||||
}
|
||||
@@ -141,7 +140,7 @@ func GetSubCommand(command types.Command, cmd []string) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func IsWriteCommand(command types.Command, subCommand types.SubCommand) bool {
|
||||
func IsWriteCommand(command Command, subCommand SubCommand) bool {
|
||||
return slices.Contains(append(command.Categories, subCommand.Categories...), constants.WriteCategory)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user