From 89b3173e6cf9210b4720503dbf8fa51d0640fadc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:01:34 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20remove=20dead=20functions=20=E2=80=94?= =?UTF-8?q?=201=20function=20removed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove unreachable Stdout function from pkg/colorwriter package. The function had no callers in production code; only the spec_test.go called it which has been removed as well. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/colorwriter/colorprofile_writer.go | 6 ------ pkg/colorwriter/colorprofile_writer_wasm.go | 6 ------ pkg/colorwriter/spec_test.go | 8 -------- 3 files changed, 20 deletions(-) diff --git a/pkg/colorwriter/colorprofile_writer.go b/pkg/colorwriter/colorprofile_writer.go index 1415d20b079..9c670fe82c5 100644 --- a/pkg/colorwriter/colorprofile_writer.go +++ b/pkg/colorwriter/colorprofile_writer.go @@ -22,12 +22,6 @@ func Stderr() io.Writer { return New(os.Stderr, os.Environ()) } -// Stdout returns a color-profile-aware writer for os.Stdout using the current -// process environment. -func Stdout() io.Writer { - return New(os.Stdout, os.Environ()) -} - // Degrade returns s with ANSI sequences downgraded (or stripped) according to // the current process environment (NO_COLOR, COLORTERM, TERM). It is intended // for use with string-returning format helpers: render the style first, then diff --git a/pkg/colorwriter/colorprofile_writer_wasm.go b/pkg/colorwriter/colorprofile_writer_wasm.go index 7807faab83c..da6fef94286 100644 --- a/pkg/colorwriter/colorprofile_writer_wasm.go +++ b/pkg/colorwriter/colorprofile_writer_wasm.go @@ -18,12 +18,6 @@ func Stderr() io.Writer { return os.Stderr } -// Stdout returns os.Stdout directly; color-profile detection is not supported -// on wasm. -func Stdout() io.Writer { - return os.Stdout -} - // Degrade returns s unchanged; color-profile detection is not supported on wasm. func Degrade(s string, _ []string) string { return s diff --git a/pkg/colorwriter/spec_test.go b/pkg/colorwriter/spec_test.go index 3c4f9547526..a309490a5d8 100644 --- a/pkg/colorwriter/spec_test.go +++ b/pkg/colorwriter/spec_test.go @@ -47,14 +47,6 @@ func TestSpec_PublicAPI_Stderr(t *testing.T) { assert.Implements(t, (*io.Writer)(nil), w, "Stderr should return an io.Writer as documented") } -// TestSpec_PublicAPI_Stdout validates the documented behavior of Stdout from the -// README.md specification. -func TestSpec_PublicAPI_Stdout(t *testing.T) { - w := colorwriter.Stdout() - require.NotNil(t, w, "Stdout should return a non-nil io.Writer") - assert.Implements(t, (*io.Writer)(nil), w, "Stdout should return an io.Writer as documented") -} - // TestSpec_PublicAPI_Degrade validates the documented behavior of Degrade from the // README.md specification. func TestSpec_PublicAPI_Degrade(t *testing.T) {