jsonrpc: gofmt
This commit is contained in:
parent
790ed0730e
commit
fd40f9a82a
@ -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"
|
||||||
|
|
||||||
|
@ -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"`
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user