fix(server): repair go vet failures from A1+A2 cleanup (orphan imports + needle deref)

This commit is contained in:
2026-05-08 10:46:43 -04:00
parent c81491164a
commit 4ce7be4296
6 changed files with 3 additions and 7 deletions
-1
View File
@@ -14,7 +14,6 @@ import (
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
)
-1
View File
@@ -8,7 +8,6 @@ import (
"github.com/go-chi/chi/v5"
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
"git.fabledsword.com/bvandeusen/minstrel/internal/tracks"
)
-3
View File
@@ -303,6 +303,3 @@ func uuidsToStrings(ids []pgtype.UUID) []string {
return out
}
// Compile-time references so the json import is always live even when
// no handler in this file decodes a body.
var _ = json.Marshal
+1
View File
@@ -10,6 +10,7 @@ import (
"strings"
"time"
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
+1 -1
View File
@@ -83,7 +83,7 @@ func (h *handlers) handleSearch(w http.ResponseWriter, r *http.Request) {
userID = user.ID
}
tracks, err := dbQ.SearchTracks(r.Context(), dbq.SearchTracksParams{
Column1: needle, UserID: userID, Limit: int32(limit), Offset: int32(offset),
Column1: q, UserID: userID, Limit: int32(limit), Offset: int32(offset),
})
if err != nil {
h.logger.Error("api: search tracks failed", "err", err)
+1 -1
View File
@@ -376,7 +376,7 @@ func (b *browseHandlers) search3(w http.ResponseWriter, r *http.Request) {
if songCount > 0 {
tracks, err := q.SearchTracks(r.Context(), dbq.SearchTracksParams{
Column1: needle, Limit: int32(songCount), Offset: int32(songOffset),
Column1: query, Limit: int32(songCount), Offset: int32(songOffset),
}) // UserID left zero (NULL) — Subsonic has no per-user quarantine context
if err != nil {
WriteFail(w, r, ErrGeneric, "Song search failed")