linting errors: clean it all up

This commit is contained in:
Zach Ramsay
2017-09-21 10:56:42 -04:00
committed by Ethan Buchman
parent b75d4f73e7
commit 8f0237610e
12 changed files with 25 additions and 34 deletions

View File

@ -56,10 +56,7 @@ func WriteRPCResponseHTTPError(w http.ResponseWriter, httpCode int, res types.RP
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(httpCode)
_, err = w.Write(jsonBytes)
if err != nil {
// ignore error
}
_, _ = w.Write(jsonBytes) // ignoring error
}
func WriteRPCResponseHTTP(w http.ResponseWriter, res types.RPCResponse) {
@ -69,10 +66,7 @@ func WriteRPCResponseHTTP(w http.ResponseWriter, res types.RPCResponse) {
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
_, err = w.Write(jsonBytes)
if err != nil {
// ignore error
}
_, _ = w.Write(jsonBytes) // ignoring error
}
//-----------------------------------------------------------------------------