mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user