Skip to content

Commit

Permalink
Merge pull request #7 from CarlJi/init
Browse files Browse the repository at this point in the history
chore: support -version flag
  • Loading branch information
CarlJi authored Dec 7, 2022
2 parents a471c96 + 5af4008 commit 04965eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ var (
)

func init() {
// usages: <command> version or <command> --version
if len(os.Args) > 1 && (os.Args[1] == "version" || os.Args[1] == "--version") {
// usages: <command> version (or --version / -version)
if len(os.Args) > 1 && (os.Args[1] == "version" || os.Args[1] == "--version" || os.Args[1] == "-version") {
Version()
os.Exit(0)
}
Expand Down

0 comments on commit 04965eb

Please sign in to comment.