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 <noreply@anthropic.com>
This commit is contained in:
@@ -153,11 +153,11 @@ func TestTrackRefFromNilPositions(t *testing.T) {
|
|||||||
|
|
||||||
func TestParsePaging(t *testing.T) {
|
func TestParsePaging(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
query url.Values
|
query url.Values
|
||||||
wantLimit int
|
wantLimit int
|
||||||
wantOffset int
|
wantOffset int
|
||||||
wantErr bool
|
wantErr bool
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "default (empty values)",
|
name: "default (empty values)",
|
||||||
|
|||||||
@@ -194,4 +194,3 @@ func (h *handlers) handleListArtists(w http.ResponseWriter, r *http.Request) {
|
|||||||
Offset: offset,
|
Offset: offset,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,13 +108,13 @@ func seedTrackWithFile(t *testing.T, pool *pgxpool.Pool, albumID, artistID pgtyp
|
|||||||
TrackNumber: &one,
|
TrackNumber: &one,
|
||||||
DiscNumber: nil,
|
DiscNumber: nil,
|
||||||
// DurationMs: arbitrary non-zero; tests don't assert on it.
|
// DurationMs: arbitrary non-zero; tests don't assert on it.
|
||||||
DurationMs: int32(len(fileBody)),
|
DurationMs: int32(len(fileBody)),
|
||||||
FilePath: path,
|
FilePath: path,
|
||||||
FileSize: int64(len(fileBody)),
|
FileSize: int64(len(fileBody)),
|
||||||
FileFormat: strings.ToLower(ext),
|
FileFormat: strings.ToLower(ext),
|
||||||
Bitrate: nil,
|
Bitrate: nil,
|
||||||
Mbid: nil,
|
Mbid: nil,
|
||||||
Genre: nil,
|
Genre: nil,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("UpsertTrack(%s): %v", title, err)
|
t.Fatalf("UpsertTrack(%s): %v", title, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user