aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/json.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-01-07 01:30:44 +0800
committerGitHub <noreply@github.com>2017-01-07 01:30:44 +0800
commitac93a6ff6cd1200ab0fb67a5bd0c02cb70646632 (patch)
tree2b06aa1b360f1488264058d04e399e84b898f0d8 /rpc/json.go
parent444fc892b0a860218dab3e421d92c33408b9eb6d (diff)
parent13e3b2f433c48fe81423c1a13e9a5194ece61b01 (diff)
downloadgo-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar
go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.gz
go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.bz2
go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.lz
go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.xz
go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.tar.zst
go-tangerine-ac93a6ff6cd1200ab0fb67a5bd0c02cb70646632.zip
Merge pull request #3525 from fjl/all-gosimple-cleanup
all: clean up lint issues, remove more dead code
Diffstat (limited to 'rpc/json.go')
-rw-r--r--rpc/json.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/rpc/json.go b/rpc/json.go
index ac5a4acd3..61a4ddf43 100644
--- a/rpc/json.go
+++ b/rpc/json.go
@@ -166,7 +166,7 @@ func parseRequest(incomingMsg json.RawMessage) ([]rpcRequest, bool, Error) {
// subscribe are special, they will always use `subscribeMethod` as first param in the payload
if in.Method == subscribeMethod {
- reqs := []rpcRequest{rpcRequest{id: &in.Id, isPubSub: true}}
+ reqs := []rpcRequest{{id: &in.Id, isPubSub: true}}
if len(in.Payload) > 0 {
// first param must be subscription name
var subscribeMethod [1]string
@@ -184,7 +184,7 @@ func parseRequest(incomingMsg json.RawMessage) ([]rpcRequest, bool, Error) {
}
if in.Method == unsubscribeMethod {
- return []rpcRequest{rpcRequest{id: &in.Id, isPubSub: true,
+ return []rpcRequest{{id: &in.Id, isPubSub: true,
method: unsubscribeMethod, params: in.Payload}}, false, nil
}
@@ -195,10 +195,10 @@ func parseRequest(incomingMsg json.RawMessage) ([]rpcRequest, bool, Error) {
// regular RPC call
if len(in.Payload) == 0 {
- return []rpcRequest{rpcRequest{service: elems[0], method: elems[1], id: &in.Id}}, false, nil
+ return []rpcRequest{{service: elems[0], method: elems[1], id: &in.Id}}, false, nil
}
- return []rpcRequest{rpcRequest{service: elems[0], method: elems[1], id: &in.Id, params: in.Payload}}, false, nil
+ return []rpcRequest{{service: elems[0], method: elems[1], id: &in.Id, params: in.Payload}}, false, nil
}
// parseBatchRequest will parse a batch request into a collection of requests from the given RawMessage, an indication