Skip to content

Commit

Permalink
Check for --help flag
Browse files Browse the repository at this point in the history
  • Loading branch information
koplas committed Mar 6, 2025
1 parent fbb6393 commit c2737dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/fakedoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ func main() {
check(err)

_, err = parser.Parse()
check(err)
if err != nil {
if flags.WroteHelp(err) {
os.Exit(0)
}
log.Fatal(err)
}

if opts.Version {
fmt.Println(fakedoc.SemVersion)
return
Expand Down

0 comments on commit c2737dd

Please sign in to comment.