feat(06-01): add Formatter interface, Registry, and TTY color detection
- pkg/output/formatter.go: Formatter interface, Options, Registry with Register/Get/Names, ErrUnknownFormat sentinel - pkg/output/colors.go: IsTTY + ColorsEnabled honoring NO_COLOR - Promote github.com/mattn/go-isatty to direct dependency - Unit tests cover registry round-trip, unknown lookup, sorted Names, non-TTY buffer, NO_COLOR override Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2
go.mod
2
go.mod
@@ -6,6 +6,7 @@ require (
|
||||
github.com/atotto/clipboard v0.1.4
|
||||
github.com/charmbracelet/lipgloss v1.1.0
|
||||
github.com/go-git/go-git/v5 v5.17.2
|
||||
github.com/mattn/go-isatty v0.0.20
|
||||
github.com/panjf2000/ants/v2 v2.12.0
|
||||
github.com/petar-dambovaliev/aho-corasick v0.0.0-20250424160509-463d218d4745
|
||||
github.com/spf13/cobra v1.10.2
|
||||
@@ -43,7 +44,6 @@ require (
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||
github.com/muesli/termenv v0.16.0 // indirect
|
||||
github.com/ncruces/go-strftime v1.0.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user