mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-11-02 12:14:15 +08:00
Changed NewPlugin function to Command that returns []utils.Command directly
This commit is contained in:
@@ -487,10 +487,8 @@ func handleSave(ctx context.Context, cmd []string, server utils.Server, conn *ne
|
||||
return []byte(utils.OK_RESPONSE), nil
|
||||
}
|
||||
|
||||
func NewModule() Plugin {
|
||||
ACLPlugin := Plugin{
|
||||
name: "ACLCommands",
|
||||
commands: []utils.Command{
|
||||
func Commands() []utils.Command {
|
||||
return []utils.Command{
|
||||
{
|
||||
Command: "auth",
|
||||
Categories: []string{utils.ConnectionCategory, utils.SlowCategory},
|
||||
@@ -605,8 +603,5 @@ When 'REPLACED' is passed, users from config file who share a username with user
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
description: "Internal plugin to handle ACL commands",
|
||||
}
|
||||
return ACLPlugin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user