diff --git a/p2p/secret_connection.go b/p2p/secret_connection.go index 02d7f6228..1e9bffc54 100644 --- a/p2p/secret_connection.go +++ b/p2p/secret_connection.go @@ -302,7 +302,7 @@ func shareAuthSignature(sc *SecretConnection, pubKey crypto.PubKeyEd25519, signa // sha256 func hash32(input []byte) (res *[32]byte) { hasher := sha256.New() - _, _ = hasher.Write(input) // error ignored + hasher.Write(input) // nolint: errcheck resSlice := hasher.Sum(nil) res = new([32]byte) copy(res[:], resSlice) @@ -312,7 +312,7 @@ func hash32(input []byte) (res *[32]byte) { // We only fill in the first 20 bytes with ripemd160 func hash24(input []byte) (res *[24]byte) { hasher := ripemd160.New() - _, _ = hasher.Write(input) // error ignored + hasher.Write(input) // nolint: errcheck resSlice := hasher.Sum(nil) res = new([24]byte) copy(res[:], resSlice) diff --git a/p2p/util.go b/p2p/util.go index 0066e348d..2b85a6cdb 100644 --- a/p2p/util.go +++ b/p2p/util.go @@ -7,9 +7,9 @@ import ( // doubleSha256 calculates sha256(sha256(b)) and returns the resulting bytes. func doubleSha256(b []byte) []byte { hasher := sha256.New() - _, _ = hasher.Write(b) // error ignored + hasher.Write(b) // nolint: errcheck sum := hasher.Sum(nil) hasher.Reset() - _, _ = hasher.Write(sum) // error ignored + hasher.Write(sum) // nolint: errcheck return hasher.Sum(nil) } diff --git a/rpc/lib/server/handlers.go b/rpc/lib/server/handlers.go index d46f0ed20..f47416641 100644 --- a/rpc/lib/server/handlers.go +++ b/rpc/lib/server/handlers.go @@ -782,5 +782,5 @@ func writeListOfEndpoints(w http.ResponseWriter, r *http.Request, funcMap map[st buf.WriteString("") w.Header().Set("Content-Type", "text/html") w.WriteHeader(200) - _, _ = w.Write(buf.Bytes()) // error ignored + w.Write(buf.Bytes()) // nolint: errcheck } diff --git a/rpc/lib/server/http_server.go b/rpc/lib/server/http_server.go index 3f2d33dc6..4e0f2bd08 100644 --- a/rpc/lib/server/http_server.go +++ b/rpc/lib/server/http_server.go @@ -56,7 +56,7 @@ func WriteRPCResponseHTTPError(w http.ResponseWriter, httpCode int, res types.RP w.Header().Set("Content-Type", "application/json") w.WriteHeader(httpCode) - _, _ = w.Write(jsonBytes) // error ignored + w.Write(jsonBytes) // nolint: errcheck } func WriteRPCResponseHTTP(w http.ResponseWriter, res types.RPCResponse) { @@ -66,7 +66,7 @@ func WriteRPCResponseHTTP(w http.ResponseWriter, res types.RPCResponse) { } w.Header().Set("Content-Type", "application/json") w.WriteHeader(200) - _, _ = w.Write(jsonBytes) // error ignored + w.Write(jsonBytes) // nolint: errcheck } //----------------------------------------------------------------------------- diff --git a/types/part_set.go b/types/part_set.go index 55f328788..d553572f3 100644 --- a/types/part_set.go +++ b/types/part_set.go @@ -34,7 +34,7 @@ func (part *Part) Hash() []byte { return part.hash } else { hasher := ripemd160.New() - _, _ = hasher.Write(part.Bytes) // error ignored + hasher.Write(part.Bytes) // nolint: errcheck part.hash = hasher.Sum(nil) return part.hash }