Skip to content

Commit

Permalink
(refactor) now not only jesus but humans can understand it too
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Jun 29, 2024
1 parent cab890b commit 0e24206
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,11 @@ func flags() {
}

func wantsVersion() {
if len(os.Args) == 2 &&
(os.Args[1] == "-version" || os.Args[1] == "--version" ||
os.Args[1] == "-v" || os.Args[1] == "--v" ||
os.Args[1] == "version") || f.version {
if len(os.Args) != 2 {
return
}
switch os.Args[1] {
case "-v", "--v", "-version", "--version":
fmt.Println(version)
os.Exit(0)
}
Expand Down

0 comments on commit 0e24206

Please sign in to comment.