mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-24 00:14:08 +08:00
Renamed NewPlugin function to a Command that returns []utils.Command directly
This commit is contained in:
@@ -589,10 +589,8 @@ func handleHDEL(ctx context.Context, cmd []string, server utils.Server, conn *ne
|
||||
return []byte(fmt.Sprintf(":%d\r\n\r\n", count)), nil
|
||||
}
|
||||
|
||||
func NewModule() Plugin {
|
||||
SetModule := Plugin{
|
||||
name: "HashCommands",
|
||||
commands: []utils.Command{
|
||||
func Commands() []utils.Command {
|
||||
return []utils.Command{
|
||||
{
|
||||
Command: "hset",
|
||||
Categories: []string{utils.HashCategory, utils.WriteCategory, utils.FastCategory},
|
||||
@@ -766,9 +764,5 @@ Return the string length of the values stored at the specified fields. 0 if the
|
||||
},
|
||||
HandlerFunc: handleHDEL,
|
||||
},
|
||||
},
|
||||
description: "Handle HASH commands",
|
||||
}
|
||||
|
||||
return SetModule
|
||||
}
|
||||
|
Reference in New Issue
Block a user