Skip to content

Commit a5dddbc

Browse files
committed
Fix lint error
1 parent eeeb73a commit a5dddbc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/codespaces/api/api_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ func createFakeSearchReposServer(t *testing.T, wantSearchText string, wantSort s
168168
responseRepos,
169169
}
170170

171-
data, _ := json.Marshal(response)
172-
w.Write(data)
171+
if err := json.NewEncoder(w).Encode(response); err != nil {
172+
t.Error(err)
173+
}
173174
}))
174175
}
175176

0 commit comments

Comments
 (0)