make linter happy
This commit is contained in:
parent
046868c4e0
commit
747a6ec2b2
2 changed files with 13 additions and 8 deletions
|
@ -57,7 +57,12 @@ func blockedSdHashes() (map[string]valOrErr, error) {
|
|||
if err != nil {
|
||||
return nil, errors.Err(err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() {
|
||||
err := resp.Body.Close()
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
}
|
||||
}()
|
||||
|
||||
var r struct {
|
||||
Success bool `json:"success"`
|
||||
|
|
|
@ -179,13 +179,13 @@ func (n *Node) listen() {
|
|||
}
|
||||
|
||||
// listenPush returns a channel of messages matching the method.
|
||||
func (n *Node) listenPush(method string) <-chan []byte {
|
||||
c := make(chan []byte, 1)
|
||||
n.pushHandlersMu.Lock()
|
||||
defer n.pushHandlersMu.Unlock()
|
||||
n.pushHandlers[method] = append(n.pushHandlers[method], c)
|
||||
return c
|
||||
}
|
||||
//func (n *Node) listenPush(method string) <-chan []byte {
|
||||
// c := make(chan []byte, 1)
|
||||
// n.pushHandlersMu.Lock()
|
||||
// defer n.pushHandlersMu.Unlock()
|
||||
// n.pushHandlers[method] = append(n.pushHandlers[method], c)
|
||||
// return c
|
||||
//}
|
||||
|
||||
// request makes a request to the server and unmarshals the response into v.
|
||||
func (n *Node) request(method string, params []string, v interface{}) error {
|
||||
|
|
Loading…
Reference in a new issue