From 8600b253fd4d2c543dc97ff619bf5f9e6f32282e Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 21 Apr 2026 23:02:20 -0400 Subject: [PATCH] style: gofmt fixes across api package CI's golangci-lint run flagged three files; two pre-existed this branch but the Plan 3 seedTrackWithFile struct-literal alignment is new. Applying gofmt across all three keeps the lint baseline clean. Co-Authored-By: Claude Opus 4.7 --- internal/api/convert_test.go | 8 ++++---- internal/api/library.go | 1 - internal/api/library_fixtures_test.go | 14 +++++++------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/internal/api/convert_test.go b/internal/api/convert_test.go index fb9e5d6b..f2d0bc12 100644 --- a/internal/api/convert_test.go +++ b/internal/api/convert_test.go @@ -153,11 +153,11 @@ func TestTrackRefFromNilPositions(t *testing.T) { func TestParsePaging(t *testing.T) { tests := []struct { - name string - query url.Values - wantLimit int + name string + query url.Values + wantLimit int wantOffset int - wantErr bool + wantErr bool }{ { name: "default (empty values)", diff --git a/internal/api/library.go b/internal/api/library.go index 087db1de..8ec44e59 100644 --- a/internal/api/library.go +++ b/internal/api/library.go @@ -194,4 +194,3 @@ func (h *handlers) handleListArtists(w http.ResponseWriter, r *http.Request) { Offset: offset, }) } - diff --git a/internal/api/library_fixtures_test.go b/internal/api/library_fixtures_test.go index 6dafbf4c..dd685fb2 100644 --- a/internal/api/library_fixtures_test.go +++ b/internal/api/library_fixtures_test.go @@ -108,13 +108,13 @@ func seedTrackWithFile(t *testing.T, pool *pgxpool.Pool, albumID, artistID pgtyp TrackNumber: &one, DiscNumber: nil, // DurationMs: arbitrary non-zero; tests don't assert on it. - DurationMs: int32(len(fileBody)), - FilePath: path, - FileSize: int64(len(fileBody)), - FileFormat: strings.ToLower(ext), - Bitrate: nil, - Mbid: nil, - Genre: nil, + DurationMs: int32(len(fileBody)), + FilePath: path, + FileSize: int64(len(fileBody)), + FileFormat: strings.ToLower(ext), + Bitrate: nil, + Mbid: nil, + Genre: nil, }) if err != nil { t.Fatalf("UpsertTrack(%s): %v", title, err)