From 747a6ec2b20e6b1a0097d7eaf903ab66fa085022 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Mon, 24 Sep 2018 10:31:14 -0400 Subject: [PATCH] make linter happy --- reflector/blocklist.go | 7 ++++++- wallet/network.go | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/reflector/blocklist.go b/reflector/blocklist.go index 2e5f829..14e60c3 100644 --- a/reflector/blocklist.go +++ b/reflector/blocklist.go @@ -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"` diff --git a/wallet/network.go b/wallet/network.go index 32e514c..d98f4e6 100644 --- a/wallet/network.go +++ b/wallet/network.go @@ -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 {