diff options
| author | Paul Buetow <paul@buetow.org> | 2025-11-02 23:42:15 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-11-02 23:42:15 +0200 |
| commit | 35e1de6f975088ade5dbf0af533fe6fdac8fcc94 (patch) | |
| tree | c9fc9b6ad86cc10a777b3f510c3c4b2d62c41ebd /cmd | |
| parent | c60d5703d25b7d76d1da2f368b0632f08a161644 (diff) | |
some linter fixes
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/hexai/main.go | 2 | ||||
| -rw-r--r-- | cmd/hexai/main_test.go | 4 |
2 files changed, 4 insertions, 2 deletions
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") |
