fix(api): gofmt + revive cleanup on lidarr search handler

This commit is contained in:
2026-04-29 17:35:45 -04:00
parent 905e27a988
commit 9192eb9f0a
2 changed files with 7 additions and 8 deletions
-1
View File
@@ -135,4 +135,3 @@ func (h *handlers) lidarrInLibrary(ctx context.Context, kind, mbid string) (bool
}
return exists, nil
}
+7 -7
View File
@@ -53,7 +53,7 @@ func lidarrArtistStubBody(mbid, name string) string {
// with 200 OK for any /api/v1/* path.
func newLidarrStub(t *testing.T, body string) *httptest.Server {
t.Helper()
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte(body))
@@ -128,16 +128,16 @@ func TestHandleLidarrSearch_ValidationErrors(t *testing.T) {
wantCode string
}{
{
name: "bad kind playlist",
q: "Beatles",
kind: "playlist",
name: "bad kind playlist",
q: "Beatles",
kind: "playlist",
wantStatus: http.StatusBadRequest,
wantCode: "bad_kind",
},
{
name: "missing query",
q: "",
kind: "artist",
name: "missing query",
q: "",
kind: "artist",
wantStatus: http.StatusBadRequest,
wantCode: "missing_query",
},