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 (
"context"
"github.com/multiformats/go-multiaddr"
"gopkg.in/urfave/cli.v2"

View File

@ -34,7 +34,6 @@ func (e *ErrClient) Unwrap(err error) error {
return e.err
}
type clientResponse struct {
Jsonrpc string `json:"jsonrpc"`
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 outId uint64
type chReg struct { id uint64; ch reflect.Value }
type chReg struct {
id uint64
ch reflect.Value
}
registerCh := make(chan chReg)
defer close(registerCh)
@ -113,7 +116,6 @@ func handleWsConn(ctx context.Context, conn *websocket.Conn, handler handlers, r
}
var caseToId []uint64
for {
chosen, val, ok := reflect.Select(cases)
@ -136,7 +138,6 @@ func handleWsConn(ctx context.Context, conn *websocket.Conn, handler handlers, r
continue
}
if !ok {
n := len(caseToId)
if n > 0 {