升级ICommand约束 && 增加日志记录
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user