From e3e78e042b0b5afd6d0f5d3537466b4b0d7a16ce Mon Sep 17 00:00:00 2001 From: Mathias Date: Sat, 5 Sep 2026 12:39:31 +0200 Subject: [PATCH] style: apply gofumpt Estate-wide consolidation pass. The canonical .golangci.yml (infra ci-templates/golangci.yml, infra#309 pattern) enables the gofumpt formatter; golangci-lint v2 default set enables NO formatter, which is why this drift accumulated silently -- the same hole that let two files rot in dma-cli until they were found by hand (dma-cli#12). Mechanical and deterministic: `gofumpt -w .`, nothing hand-edited. Verified per repo before commit -- gofumpt -l now reports 0, gofmt -l reports 0, and go build + go vet both pass. Clears this repo to adopt the canonical lint config in a later wave. --- internal/web/paste_test.go | 3 ++- internal/web/visual_theme_test.go | 3 ++- test/acceptance/summarize_new_video_test.go | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/web/paste_test.go b/internal/web/paste_test.go index be2f709..ee92feb 100644 --- a/internal/web/paste_test.go +++ b/internal/web/paste_test.go @@ -3,9 +3,10 @@ package web import ( "bytes" "context" - "git.d-ma.be/mathias/tapir/internal/adapters/store" "strings" "testing" + + "git.d-ma.be/mathias/tapir/internal/adapters/store" ) func TestParseYouTubeVideoID(t *testing.T) { diff --git a/internal/web/visual_theme_test.go b/internal/web/visual_theme_test.go index 33e5236..fce5b65 100644 --- a/internal/web/visual_theme_test.go +++ b/internal/web/visual_theme_test.go @@ -14,7 +14,8 @@ import ( // page renders any GET path's full HTML (helper for theme/structure assertions). func page(t *testing.T, app interface { Router() http.Handler -}, path string) string { +}, path string, +) string { t.Helper() rec := httptest.NewRecorder() app.Router().ServeHTTP(rec, httptest.NewRequest(http.MethodGet, path, nil)) diff --git a/test/acceptance/summarize_new_video_test.go b/test/acceptance/summarize_new_video_test.go index 9f6ac09..1900c6a 100644 --- a/test/acceptance/summarize_new_video_test.go +++ b/test/acceptance/summarize_new_video_test.go @@ -25,9 +25,11 @@ type fakeSource struct { func (f fakeSource) ListSubscriptions(ctx context.Context, userID string) ([]domain.Subscription, error) { return nil, nil } + func (f fakeSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) { return nil, nil } + func (f fakeSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) { return f.transcript, nil } @@ -132,10 +134,12 @@ type watchSource struct { func (s *watchSource) ListSubscriptions(ctx context.Context, userID string) ([]domain.Subscription, error) { return s.subs, nil } + func (s *watchSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) { s.newVideoHits++ return s.videosBySub[sub.ID], nil } + func (s *watchSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) { return s.transcripts[v.ID], nil }