From 35e1de6f975088ade5dbf0af533fe6fdac8fcc94 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 2 Nov 2025 23:42:15 +0200 Subject: some linter fixes --- internal/tmux/status_more_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/tmux') diff --git a/internal/tmux/status_more_test.go b/internal/tmux/status_more_test.go index deaf57d..39cbe45 100644 --- a/internal/tmux/status_more_test.go +++ b/internal/tmux/status_more_test.go @@ -22,16 +22,16 @@ func TestFormatLLMStatsStatusColored_Basic(t *testing.T) { func TestFormatGlobalStatusColored_NarrowAndMaxLen(t *testing.T) { // Narrow mode should elide the tail - os.Setenv("HEXAI_TMUX_STATUS_NARROW", "1") - defer os.Unsetenv("HEXAI_TMUX_STATUS_NARROW") + _ = os.Setenv("HEXAI_TMUX_STATUS_NARROW", "1") + defer func() { _ = os.Unsetenv("HEXAI_TMUX_STATUS_NARROW") }() s := FormatGlobalStatusColored(10, 3.3, 1000, 2000, "prov", "model", 1.1, 4, 30*time.Minute) if containsAll(s, []string{"|", "prov:model"}) { t.Fatalf("narrow mode should not include tail: %q", s) } // Max length should also drop the tail when it would overflow - os.Unsetenv("HEXAI_TMUX_STATUS_NARROW") - os.Setenv("HEXAI_TMUX_STATUS_MAXLEN", "10") - defer os.Unsetenv("HEXAI_TMUX_STATUS_MAXLEN") + _ = os.Unsetenv("HEXAI_TMUX_STATUS_NARROW") + _ = os.Setenv("HEXAI_TMUX_STATUS_MAXLEN", "10") + defer func() { _ = os.Unsetenv("HEXAI_TMUX_STATUS_MAXLEN") }() s2 := FormatGlobalStatusColored(10, 3.3, 1000, 2000, "prov", "model", 1.1, 4, 30*time.Minute) if containsAll(s2, []string{"|", "prov:model"}) { t.Fatalf("maxlen should drop tail when overflowing: %q", s2) -- cgit v1.2.3