fix errcheck warnings (#1739)
This commit is contained in:
committed by
thinkerou
parent
29a145c85d
commit
b056a34bdc
+3
-3
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user