diff --git a/internal/api/playlists_test.go b/internal/api/playlists_test.go index 241fdf8b..1c31237e 100644 --- a/internal/api/playlists_test.go +++ b/internal/api/playlists_test.go @@ -454,4 +454,3 @@ func TestPlaylists_CoverNoneReturns404(t *testing.T) { t.Errorf("status = %d, want 404; body = %s", w.Code, w.Body.String()) } } - diff --git a/internal/config/config.go b/internal/config/config.go index 5deb6971..cf252537 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -29,6 +29,7 @@ type ServerConfig struct { // StorageConfig points at on-disk locations the server uses for cached // runtime artifacts. Currently: // - DataDir hosts /playlist_covers/{playlist_id}.jpg (M7 #352). +// // More entries may grow here (e.g., transcode cache) without breaking // existing layouts. type StorageConfig struct { diff --git a/internal/playlists/collage.go b/internal/playlists/collage.go index c99f5863..0a913acc 100644 --- a/internal/playlists/collage.go +++ b/internal/playlists/collage.go @@ -116,7 +116,7 @@ func loadCellImage(coverPath, dataDir string) image.Image { if err != nil { return fallbackGlyph() } - defer f.Close() + defer func() { _ = f.Close() }() img, _, err := image.Decode(f) if err != nil { return fallbackGlyph() diff --git a/internal/playlists/collage_test.go b/internal/playlists/collage_test.go index 44e2431e..baca17b2 100644 --- a/internal/playlists/collage_test.go +++ b/internal/playlists/collage_test.go @@ -61,7 +61,7 @@ func TestGenerateCollage_OneTrack(t *testing.T) { if err != nil { t.Fatalf("open collage: %v", err) } - defer f.Close() + defer func() { _ = f.Close() }() img, format, err := image.Decode(f) if err != nil { t.Fatalf("decode collage: %v", err) diff --git a/internal/server/server_test.go b/internal/server/server_test.go index 6e75d49f..ba87f22d 100644 --- a/internal/server/server_test.go +++ b/internal/server/server_test.go @@ -10,6 +10,7 @@ import ( "os" "strings" "testing" + "time" "github.com/go-chi/chi/v5" "github.com/jackc/pgx/v5/pgxpool" @@ -20,7 +21,6 @@ import ( "git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq" "git.fabledsword.com/bvandeusen/minstrel/internal/library" "git.fabledsword.com/bvandeusen/minstrel/internal/subsonic" - "time" ) func TestHealthz(t *testing.T) { @@ -58,7 +58,7 @@ func TestHealthz_IncludesMinClientVersion(t *testing.T) { if err != nil { t.Fatalf("GET /healthz: %v", err) } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() var body map[string]string if err := json.NewDecoder(resp.Body).Decode(&body); err != nil { @@ -247,6 +247,6 @@ func TestRouter_AdminSubtreeNotShadowed(t *testing.T) { // route-presence assertions in this file. type stubScanner struct{} -func (stubScanner) Scan(ctx context.Context) (library.Stats, error) { +func (stubScanner) Scan(_ context.Context) (library.Stats, error) { panic("stubScanner.Scan called from server_test") } diff --git a/internal/tracks/service.go b/internal/tracks/service.go index 5500a594..53574157 100644 --- a/internal/tracks/service.go +++ b/internal/tracks/service.go @@ -84,7 +84,7 @@ func NewService(pool *pgxpool.Pool, logger *slog.Logger, lidarr LidarrUnmonitore // re-plumb when audit logging lands. func (s *Service) RemoveTrack( ctx context.Context, - trackID, adminID pgtype.UUID, + trackID, adminID pgtype.UUID, //nolint:revive // adminID reserved for audit-log wiring in a follow-up unmonitor bool, ) (deletedAlbumID *pgtype.UUID, deletedArtistID *pgtype.UUID, lidarrUnmonitorFailed bool, err error) { q := dbq.New(s.pool) diff --git a/internal/tracks/service_test.go b/internal/tracks/service_test.go index 8bb1d468..d7ce67a6 100644 --- a/internal/tracks/service_test.go +++ b/internal/tracks/service_test.go @@ -106,7 +106,7 @@ type fakeLidarrUnmonitorer struct { err error } -func (f *fakeLidarrUnmonitorer) UnmonitorTrack(ctx context.Context, trackMbid, albumMbid string) error { +func (f *fakeLidarrUnmonitorer) UnmonitorTrack(_ context.Context, trackMbid, albumMbid string) error { f.calls = append(f.calls, trackMbid) f.albumMbid = albumMbid return f.err