fix errcheck warnings (#1739)

This commit is contained in:
Dmitry Kutakov
2019-01-18 04:32:53 +03:00
committed by thinkerou
parent 29a145c85d
commit b056a34bdc
19 changed files with 122 additions and 83 deletions
+3 -3
View File
@@ -34,7 +34,7 @@ func TestError(t *testing.T) {
jsonBytes, _ := json.Marshal(err)
assert.Equal(t, "{\"error\":\"test error\",\"meta\":\"some data\"}", string(jsonBytes))
err.SetMeta(H{
err.SetMeta(H{ // nolint: errcheck
"status": "200",
"data": "some data",
})
@@ -44,7 +44,7 @@ func TestError(t *testing.T) {
"data": "some data",
}, err.JSON())
err.SetMeta(H{
err.SetMeta(H{ // nolint: errcheck
"error": "custom error",
"status": "200",
"data": "some data",
@@ -59,7 +59,7 @@ func TestError(t *testing.T) {
status string
data string
}
err.SetMeta(customError{status: "200", data: "other data"})
err.SetMeta(customError{status: "200", data: "other data"}) // nolint: errcheck
assert.Equal(t, customError{status: "200", data: "other data"}, err.JSON())
}