From d061f15efba7fb123b96247c9d161f070a376e59 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 3 Nov 2017 15:35:43 +0900 Subject: [PATCH] ing --- protocol/json/client_notify.go | 2 +- protocol/json/server.go | 2 +- protocol/registry_codec.go | 2 +- registry.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol/json/client_notify.go b/protocol/json/client_notify.go index 2fb5762..d5ea9aa 100644 --- a/protocol/json/client_notify.go +++ b/protocol/json/client_notify.go @@ -47,7 +47,7 @@ func (ccn *ClientCodecNotify) Method() string { return ccn.notify.Method } -func (ccn *ClientCodecNotify) ReadParams(args *[]interface{}) error { +func (ccn *ClientCodecNotify) ReadParams(args []interface{}) error { if ccn.err == nil && ccn.notify.Params != nil { // Note: if scr.request.Params is nil it's not an error, it's an optional member. // JSON params structured object. Unmarshal to the args object. diff --git a/protocol/json/server.go b/protocol/json/server.go index fc580ff..bf0f729 100644 --- a/protocol/json/server.go +++ b/protocol/json/server.go @@ -160,7 +160,7 @@ func (scr *ServerCodecRequest) Method() string { // absence of expected names MAY result in an error being // generated. The names MUST match exactly, including // case, to the method's expected parameters. -func (scr *ServerCodecRequest) ReadParams(args *[]interface{}) error { +func (scr *ServerCodecRequest) ReadParams(args []interface{}) error { if scr.err == nil && scr.request.Params != nil { // Note: if scr.request.Params is nil it's not an error, it's an optional member. // JSON params structured object. Unmarshal to the args object. diff --git a/protocol/registry_codec.go b/protocol/registry_codec.go index d4fa450..9279fb7 100644 --- a/protocol/registry_codec.go +++ b/protocol/registry_codec.go @@ -8,6 +8,6 @@ type RegistryCodec interface { // Reads the request and returns the RPC method name. Method() string // Reads the request filling the RPC method args. - ReadParams(args *[]interface{}) error + ReadParams(args []interface{}) error Complete() } diff --git a/registry.go b/registry.go index f64e1fd..1e917dd 100644 --- a/registry.go +++ b/registry.go @@ -80,7 +80,7 @@ func (rr *rpcRegistry) Invoke(codec protocol.RegistryCodec) (result interface{}, pValues, pInstances := methodSpec.getParamValues() if nil != pInstances && 0 < len(pInstances) { - if errRead := codec.ReadParams(&pInstances); errRead != nil { + if errRead := codec.ReadParams(pInstances); errRead != nil { return nil, errRead } pCount := len(pInstances)