WIP
This commit is contained in:
@@ -10,22 +10,9 @@ type PluginClient struct {
|
||||
client *rpc.Client
|
||||
}
|
||||
|
||||
type DoRequest struct {
|
||||
CommandName string `json:"commandName"`
|
||||
Args map[string]string `json:"args"`
|
||||
}
|
||||
|
||||
// Do implements Plugin
|
||||
func (pc *PluginClient) Do(ctx context.Context, commandName string, args map[string]string) error {
|
||||
req := &DoRequest{
|
||||
CommandName: commandName,
|
||||
Args: args,
|
||||
}
|
||||
//doReq, err := json.Marshal(req)
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
err := pc.client.Call("Plugin.Do", req, new(any))
|
||||
func (pc *PluginClient) Do(ctx context.Context, cmd *DoCommand) error {
|
||||
err := pc.client.Call("Plugin.Do", cmd, new(string))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user