make linter happy

This commit is contained in:
Alex Grintsvayg 2018-09-24 10:31:14 -04:00
parent 046868c4e0
commit 747a6ec2b2
2 changed files with 13 additions and 8 deletions

View file

@ -57,7 +57,12 @@ func blockedSdHashes() (map[string]valOrErr, error) {
if err != nil { if err != nil {
return nil, errors.Err(err) return nil, errors.Err(err)
} }
defer resp.Body.Close() defer func() {
err := resp.Body.Close()
if err != nil {
log.Errorln(err)
}
}()
var r struct { var r struct {
Success bool `json:"success"` Success bool `json:"success"`

View file

@ -179,13 +179,13 @@ func (n *Node) listen() {
} }
// listenPush returns a channel of messages matching the method. // listenPush returns a channel of messages matching the method.
func (n *Node) listenPush(method string) <-chan []byte { //func (n *Node) listenPush(method string) <-chan []byte {
c := make(chan []byte, 1) // c := make(chan []byte, 1)
n.pushHandlersMu.Lock() // n.pushHandlersMu.Lock()
defer n.pushHandlersMu.Unlock() // defer n.pushHandlersMu.Unlock()
n.pushHandlers[method] = append(n.pushHandlers[method], c) // n.pushHandlers[method] = append(n.pushHandlers[method], c)
return c // return c
} //}
// request makes a request to the server and unmarshals the response into v. // request makes a request to the server and unmarshals the response into v.
func (n *Node) request(method string, params []string, v interface{}) error { func (n *Node) request(method string, params []string, v interface{}) error {