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 --- cmd/hexai/main.go | 2 +- cmd/hexai/main_test.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/hexai/main.go b/cmd/hexai/main.go index 7caedc6..d0508e7 100644 --- a/cmd/hexai/main.go +++ b/cmd/hexai/main.go @@ -44,7 +44,7 @@ func main() { } _ = fs.Parse(remaining) if *showVersion { - fmt.Fprintln(os.Stdout, internal.Version) + _, _ = fmt.Fprintln(os.Stdout, internal.Version) return } var selection []int diff --git a/cmd/hexai/main_test.go b/cmd/hexai/main_test.go index 70c844f..797584f 100644 --- a/cmd/hexai/main_test.go +++ b/cmd/hexai/main_test.go @@ -15,7 +15,9 @@ func TestMain_Version(t *testing.T) { os.Stdout = w defer func() { os.Stdout = old }() main() - w.Close() + if err := w.Close(); err != nil { + t.Fatalf("failed to close pipe: %v", err) + } b, _ := io.ReadAll(r) if len(b) == 0 { t.Fatalf("expected version output") -- cgit v1.2.3