jsonrpc: gofmt
This commit is contained in:
parent
790ed0730e
commit
fd40f9a82a
@ -4,6 +4,7 @@ package daemon
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"gopkg.in/urfave/cli.v2"
|
||||
|
||||
|
@ -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"`
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user