diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-09 22:20:03 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-09 22:20:03 +0300 |
| commit | 2d58ee0600a5efc8c625ace603d8613b5f6d0ab8 (patch) | |
| tree | de02e62bea1d04ab3084af8276f3fe79a5983661 /internal | |
| parent | 05a8c2ba95ec9ed81898fa3545f36c96760b48df (diff) | |
style: gofmt and goimports formatting fixes
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/model/podcast.go | 32 | ||||
| -rw-r--r-- | internal/probe/image_test.go | 2 | ||||
| -rw-r--r-- | internal/repository/podcast_test.go | 10 | ||||
| -rw-r--r-- | internal/service/import.go | 4 | ||||
| -rw-r--r-- | internal/service/tag_test.go | 10 |
5 files changed, 30 insertions, 28 deletions
diff --git a/internal/model/podcast.go b/internal/model/podcast.go index 5c3cdbc..8b5c3a2 100644 --- a/internal/model/podcast.go +++ b/internal/model/podcast.go @@ -5,17 +5,17 @@ import "time" // PodcastFeed represents a subscribed RSS/Atom feed linked to a set. type PodcastFeed struct { - ID int64 `json:"id"` - SetID int64 `json:"set_id"` - FeedURL string `json:"feed_url"` - Title string `json:"title"` - Description string `json:"description"` - ImageURL string `json:"image_url"` - LastCheckedAt *time.Time `json:"last_checked_at"` - LastETag string `json:"last_etag"` - CheckIntervalMinutes int `json:"check_interval_minutes"` - AutoDownload bool `json:"auto_download"` - CreatedAt time.Time `json:"created_at"` + ID int64 `json:"id"` + SetID int64 `json:"set_id"` + FeedURL string `json:"feed_url"` + Title string `json:"title"` + Description string `json:"description"` + ImageURL string `json:"image_url"` + LastCheckedAt *time.Time `json:"last_checked_at"` + LastETag string `json:"last_etag"` + CheckIntervalMinutes int `json:"check_interval_minutes"` + AutoDownload bool `json:"auto_download"` + CreatedAt time.Time `json:"created_at"` } // PodcastEpisode represents an individual episode from a feed. @@ -37,11 +37,11 @@ type PodcastEpisode struct { // PodcastStatus tracks per-user completion and progress for an episode. type PodcastStatus struct { - UserID int64 `json:"user_id"` - EpisodeID int64 `json:"episode_id"` - IsCompleted bool `json:"is_completed"` - PositionSeconds float64 `json:"position_seconds"` - UpdatedAt time.Time `json:"updated_at"` + UserID int64 `json:"user_id"` + EpisodeID int64 `json:"episode_id"` + IsCompleted bool `json:"is_completed"` + PositionSeconds float64 `json:"position_seconds"` + UpdatedAt time.Time `json:"updated_at"` } // PodcastEpisodeWithStatus is a PodcastEpisode augmented with per-user status. diff --git a/internal/probe/image_test.go b/internal/probe/image_test.go index 770d6e2..77677a3 100644 --- a/internal/probe/image_test.go +++ b/internal/probe/image_test.go @@ -229,4 +229,4 @@ func TestParseFFprobeOutput_BitrateParsing(t *testing.T) { if meta.Bitrate != 0 { t.Errorf("Bitrate = %d, want 0", meta.Bitrate) } -}
\ No newline at end of file +} diff --git a/internal/repository/podcast_test.go b/internal/repository/podcast_test.go index 52ce9dc..312508f 100644 --- a/internal/repository/podcast_test.go +++ b/internal/repository/podcast_test.go @@ -61,11 +61,11 @@ func TestPodcastRepo_CRUD(t *testing.T) { // Create episode. episode := &model.PodcastEpisode{ - FeedID: feedID, - GUID: "ep-1", - Title: "Episode 1", - EpisodeURL: "https://example.com/ep1.mp3", - CreatedAt: now, + FeedID: feedID, + GUID: "ep-1", + Title: "Episode 1", + EpisodeURL: "https://example.com/ep1.mp3", + CreatedAt: now, } epID, err := s.CreateEpisode(ctx, episode) if err != nil { diff --git a/internal/service/import.go b/internal/service/import.go index dde06b9..90fa4b1 100644 --- a/internal/service/import.go +++ b/internal/service/import.go @@ -18,7 +18,9 @@ import ( // fetching an episode enclosure). func ImportMediaFile( ctx context.Context, - store interface{ UpdateMedia(ctx context.Context, media *model.Media) error }, + store interface { + UpdateMedia(ctx context.Context, media *model.Media) error + }, media *model.Media, prober probe.Prober, thumbGen thumb.Generator, diff --git a/internal/service/tag_test.go b/internal/service/tag_test.go index 7a87300..f198c89 100644 --- a/internal/service/tag_test.go +++ b/internal/service/tag_test.go @@ -13,11 +13,11 @@ func TestTagService_AssignTag(t *testing.T) { ctx := context.Background() tests := []struct { - name string - tagExists bool - createErr error - assignErr error - wantErr bool + name string + tagExists bool + createErr error + assignErr error + wantErr bool }{ { name: "existing tag", |
