Skip to content

Commit

Permalink
add docstring for printUsageAndExit
Browse files Browse the repository at this point in the history
  • Loading branch information
n-oden committed Nov 21, 2024
1 parent add3bec commit cbaa89d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ func printUsage() {
flag.PrintDefaults()
}

// printUsageAndExit prints usage and exits with status 0
// if err is nil, otherwise it prints the error and exits with status 1
func printUsageAndExit(err error) {
printUsage()
if err != nil {
Expand Down

0 comments on commit cbaa89d

Please sign in to comment.