Merge PR #1438: Tools: Add errcheck linter

This linter ensures that all errors are checked.
This is disabled in the client directories, since its not needed on
those writes
This commit is contained in:
Dev Ojha
2018-06-29 00:52:10 +02:00
committed by Christopher Goes
parent 7f59aa259f
commit ac3adff1e8
30 changed files with 193 additions and 46 deletions
+8 -2
View File
@@ -101,7 +101,10 @@ func waitForHeight(height int64, url string) {
if err != nil {
panic(err)
}
res.Body.Close()
err = res.Body.Close()
if err != nil {
panic(err)
}
var resultBlock ctypes.ResultBlock
err = cdc.UnmarshalJSON(body, &resultBlock)
@@ -136,7 +139,10 @@ func WaitForStart(port string) {
// waiting for server to start ...
if res.StatusCode != http.StatusOK {
res.Body.Close()
err = res.Body.Close()
if err != nil {
panic(err)
}
return
}
}