jsonrpc: gofmt

This commit is contained in:
Łukasz Magiera 2019-07-22 22:28:40 +02:00
parent 790ed0730e
commit fd40f9a82a
5 changed files with 24 additions and 23 deletions

View File

@ -4,6 +4,7 @@ package daemon
import ( import (
"context" "context"
"github.com/multiformats/go-multiaddr" "github.com/multiformats/go-multiaddr"
"gopkg.in/urfave/cli.v2" "gopkg.in/urfave/cli.v2"

View File

@ -34,7 +34,6 @@ func (e *ErrClient) Unwrap(err error) error {
return e.err return e.err
} }
type clientResponse struct { type clientResponse struct {
Jsonrpc string `json:"jsonrpc"` Jsonrpc string `json:"jsonrpc"`
Result json.RawMessage `json:"result"` Result json.RawMessage `json:"result"`

View File

@ -98,7 +98,10 @@ func handleWsConn(ctx context.Context, conn *websocket.Conn, handler handlers, r
var chOnce sync.Once var chOnce sync.Once
var outId uint64 var outId uint64
type chReg struct { id uint64; ch reflect.Value } type chReg struct {
id uint64
ch reflect.Value
}
registerCh := make(chan chReg) registerCh := make(chan chReg)
defer close(registerCh) defer close(registerCh)
@ -113,7 +116,6 @@ func handleWsConn(ctx context.Context, conn *websocket.Conn, handler handlers, r
} }
var caseToId []uint64 var caseToId []uint64
for { for {
chosen, val, ok := reflect.Select(cases) chosen, val, ok := reflect.Select(cases)
@ -136,7 +138,6 @@ func handleWsConn(ctx context.Context, conn *websocket.Conn, handler handlers, r
continue continue
} }
if !ok { if !ok {
n := len(caseToId) n := len(caseToId)
if n > 0 { if n > 0 {