Skip to content

Commit 04965eb

Browse files
authored
Merge pull request #7 from CarlJi/init
chore: support -version flag
2 parents a471c96 + 5af4008 commit 04965eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

version.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ var (
4141
)
4242

4343
func init() {
44-
// usages: <command> version or <command> --version
45-
if len(os.Args) > 1 && (os.Args[1] == "version" || os.Args[1] == "--version") {
44+
// usages: <command> version (or --version / -version)
45+
if len(os.Args) > 1 && (os.Args[1] == "version" || os.Args[1] == "--version" || os.Args[1] == "-version") {
4646
Version()
4747
os.Exit(0)
4848
}

0 commit comments

Comments
 (0)