(method string, paramsIn ...interface{})
| 447 | } |
| 448 | |
| 449 | func (c *Client) newMessage(method string, paramsIn ...interface{}) (*jsonrpcMessage, error) { |
| 450 | params, err := json.Marshal(paramsIn) |
| 451 | if err != nil { |
| 452 | return nil, err |
| 453 | } |
| 454 | return &jsonrpcMessage{Version: "2.0", ID: c.nextID(), Method: method, Params: params}, nil |
| 455 | } |
| 456 | |
| 457 | // send registers op with the dispatch loop, then sends msg on the connection. |
| 458 | // if sending fails, op is deregistered. |
no test coverage detected