with normal string gob

This commit is contained in:
Kasper Juul Hermansen 2022-11-05 23:09:16 +01:00
parent 60623df003
commit e34aa4134e
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
3 changed files with 7 additions and 4 deletions

View File

@ -66,6 +66,5 @@ func (cc *CharContext) About(ctx context.Context) ([]register.AboutItem, error)
} }
func (cc *CharContext) Do(ctx context.Context, clientName string, commandName string, args map[string]string) error { func (cc *CharContext) Do(ctx context.Context, clientName string, commandName string, args map[string]string) error {
cc.pluginRegister.Do(ctx, clientName, commandName, args) return cc.pluginRegister.Do(ctx, clientName, commandName, args)
return nil
} }

View File

@ -237,5 +237,9 @@ func (pr *PluginRegister) Do(ctx context.Context, clientName string, commandName
return client.plugin.Do(ctx, commandName, args) return client.plugin.Do(ctx, commandName, args)
}) })
if err := errgroup.Wait(); err != nil {
return err
}
return nil return nil
} }

View File

@ -9,9 +9,9 @@ type PluginServer struct {
Impl Plugin Impl Plugin
} }
func (ps *PluginServer) Do(args *string, resp *string) error { func (ps *PluginServer) Do(args string, resp *string) error {
var doReq DoRequest var doReq DoRequest
if err := json.Unmarshal([]byte(*args), &doReq); err != nil { if err := json.Unmarshal([]byte(args), &doReq); err != nil {
return err return err
} }