Skip to content

Commit c015969

Browse files
authored
Merge pull request #17 from pepabo/fix/suppress-double-error-output
fix: suppress double error output by removing redundant error print in main.go
2 parents a263c56 + 1e9daa9 commit c015969

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

main.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
package main
22

33
import (
4-
"fmt"
54
"os"
65

76
"github.com/pepabo/onecli/cmd"
87
)
98

10-
var version string
11-
129
func main() {
13-
if len(os.Args) > 1 && os.Args[1] == "--version" {
14-
fmt.Printf("onecli version %s\n", version)
15-
return
16-
}
1710
if err := cmd.Execute(); err != nil {
18-
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
1911
os.Exit(1)
2012
}
2113
}

0 commit comments

Comments
 (0)