Summary #
Organizes configuration fields, environment variable loading, and documentation in a consistent top-to-bottom order with zero behavioral changes:
- Logical grouping (
internal/server/server.go,cmd/goosefoot/main.go,env.example,README.md): Order configuration uniformly by concern—required settings (GOOSEFOOT_API_KEY,GOOSEFOOT_IMPORT_DIR), HTTP server (GOOSEFOOT_HOST,GOOSEFOOT_PORT), import pipeline (GOOSEFOOT_HOOKS_DIR,BEETS_BIN), logging (LOG_LEVEL,FORCE_COLOR), and internal server tuning (timeouts/TTLs, then admission limits). - Centralized boundary loading (
cmd/goosefoot/main.go): ExtractloadConfigso allgetenvreads happen in one place at the CLI entry boundary, and extractnormalizeConfigininternal/server/server.gomirroringserver.Config's field order. - Documentation parity (
README.md): DocumentFORCE_COLORalongsideLOG_LEVELto matchenv.example.
Verification #
gofmt -l .go vet ./...go test -race -count=1 ./...