chore: Linter rule for properly formatted api errors (#2123)

* chore: Linter rule for properly formatted api errors
* Add omitempty to 'Detail' field
This commit is contained in:
Steven Masley
2022-06-07 09:33:06 -05:00
committed by GitHub
parent 3f1e885d21
commit af401e3fe1
37 changed files with 351 additions and 302 deletions

View File

@ -20,7 +20,7 @@ func TestWrite(t *testing.T) {
t.Parallel()
rw := httptest.NewRecorder()
httpapi.Write(rw, http.StatusOK, httpapi.Response{
Message: "wow",
Message: "Wow.",
})
var m map[string]interface{}
err := json.NewDecoder(rw.Body).Decode(&m)