chore: upgrade golangci-lint and fix golangci-lint error (#3278)

This commit is contained in:
thinkerou
2022-08-15 21:38:20 +08:00
committed by GitHub
parent 1b5ba251cf
commit b04917c53e
12 changed files with 74 additions and 60 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ func TestError(t *testing.T) {
jsonBytes, _ := json.Marshal(err)
assert.Equal(t, "{\"error\":\"test error\",\"meta\":\"some data\"}", string(jsonBytes))
err.SetMeta(H{ // nolint: errcheck
err.SetMeta(H{ //nolint: errcheck
"status": "200",
"data": "some data",
})
@@ -45,7 +45,7 @@ func TestError(t *testing.T) {
"data": "some data",
}, err.JSON())
err.SetMeta(H{ // nolint: errcheck
err.SetMeta(H{ //nolint: errcheck
"error": "custom error",
"status": "200",
"data": "some data",
@@ -60,7 +60,7 @@ func TestError(t *testing.T) {
status string
data string
}
err.SetMeta(customError{status: "200", data: "other data"}) // nolint: errcheck
err.SetMeta(customError{status: "200", data: "other data"}) //nolint: errcheck
assert.Equal(t, customError{status: "200", data: "other data"}, err.JSON())
}