style: apply gofumpt
CI / Lint / Test / Vet (push) Successful in 21s
CI / Build & Import (push) Successful in 10s
CI / Deploy via GitOps (push) Successful in 4s

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.
This commit is contained in:
2026-09-05 12:39:31 +02:00
parent 6f1e0be09b
commit e3e78e042b
3 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -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) {
+2 -1
View File
@@ -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))
@@ -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
}