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.
This commit is contained in:
@@ -3,9 +3,10 @@ package web
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"git.d-ma.be/mathias/tapir/internal/adapters/store"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.d-ma.be/mathias/tapir/internal/adapters/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseYouTubeVideoID(t *testing.T) {
|
func TestParseYouTubeVideoID(t *testing.T) {
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ import (
|
|||||||
// page renders any GET path's full HTML (helper for theme/structure assertions).
|
// page renders any GET path's full HTML (helper for theme/structure assertions).
|
||||||
func page(t *testing.T, app interface {
|
func page(t *testing.T, app interface {
|
||||||
Router() http.Handler
|
Router() http.Handler
|
||||||
}, path string) string {
|
}, path string,
|
||||||
|
) string {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
rec := httptest.NewRecorder()
|
rec := httptest.NewRecorder()
|
||||||
app.Router().ServeHTTP(rec, httptest.NewRequest(http.MethodGet, path, nil))
|
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) {
|
func (f fakeSource) ListSubscriptions(ctx context.Context, userID string) ([]domain.Subscription, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f fakeSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) {
|
func (f fakeSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f fakeSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) {
|
func (f fakeSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) {
|
||||||
return f.transcript, nil
|
return f.transcript, nil
|
||||||
}
|
}
|
||||||
@@ -132,10 +134,12 @@ type watchSource struct {
|
|||||||
func (s *watchSource) ListSubscriptions(ctx context.Context, userID string) ([]domain.Subscription, error) {
|
func (s *watchSource) ListSubscriptions(ctx context.Context, userID string) ([]domain.Subscription, error) {
|
||||||
return s.subs, nil
|
return s.subs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *watchSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) {
|
func (s *watchSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) {
|
||||||
s.newVideoHits++
|
s.newVideoHits++
|
||||||
return s.videosBySub[sub.ID], nil
|
return s.videosBySub[sub.ID], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *watchSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) {
|
func (s *watchSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) {
|
||||||
return s.transcripts[v.ID], nil
|
return s.transcripts[v.ID], nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user