summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hexai/main.go2
-rw-r--r--cmd/hexai/main_test.go4
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")