summaryrefslogtreecommitdiff
path: root/internal/tmux
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-11-02 23:42:15 +0200
committerPaul Buetow <paul@buetow.org>2025-11-02 23:42:15 +0200
commit35e1de6f975088ade5dbf0af533fe6fdac8fcc94 (patch)
treec9fc9b6ad86cc10a777b3f510c3c4b2d62c41ebd /internal/tmux
parentc60d5703d25b7d76d1da2f368b0632f08a161644 (diff)
some linter fixes
Diffstat (limited to 'internal/tmux')
-rw-r--r--internal/tmux/status_more_test.go10
1 files changed, 5 insertions, 5 deletions
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)