Skip to content

Commit

Permalink
Sanity check for CLI args
Browse files Browse the repository at this point in the history
  • Loading branch information
afreeorange committed Apr 26, 2023
1 parent 4ddc5eb commit 8ce353b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0-beta.01
5.1.0-beta
1 change: 1 addition & 0 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (
EXIT_COULD_NOT_GENERATE_LIST_OF_ENTITIES
EXIT_COULD_NOT_WRITE_ENTITY_TREE
EXIT_COULD_NOT_CREATE_OUTPUT_FOLDER
EXIT_INVALID_FLAG_SUPPLIED
)

// Things to ignore when walking the article repository. NOTE: In Golang, only
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ func main() {
fmt.Println(help)
os.Exit(0)

default:
fmt.Println("I don't know what this means:", arg)
fmt.Println("Use --help to see usage.")
os.Exit(EXIT_INVALID_FLAG_SUPPLIED)
}
}

Expand Down

0 comments on commit 8ce353b

Please sign in to comment.