升级ICommand约束 && 增加日志记录

This commit is contained in:
2021-04-18 21:55:41 +08:00
parent 47e35b35bd
commit 844da3f325
4 changed files with 221 additions and 36 deletions

View File

@ -79,7 +79,6 @@ func (e exampleCommand) GetConfigOption() []config.SetCommandConfig {
return []config.SetCommandConfig{config.ClosePushCommandErrorMessage()}
}
func (e exampleCommand) Execute(ctx *context.WSContext, data []byte) error {
message.Response(ctx, map[string]interface{}{"ping": "pong"})
return nil
func (e exampleCommand) Execute(ctx *context.WSContext, data []byte) (interface{}, error) {
return map[string]interface{}{"ping": "pong"}, nil
}