alexflint / go-arg

Struct-based argument parsing in Go
https://pkg.go.dev/github.com/alexflint/go-arg
BSD 2-Clause "Simplified" License
2.04k stars 100 forks source link

exit code should be 2 on flag parsing error #246

Closed santhosh-tekuri closed 4 months ago

santhosh-tekuri commented 6 months ago

normally exit code 2 is used to denote Incorrect command (or argument) usage

the flag package from standard library also uses exit code 2

currently this library is doing osExit(-1) which is resolving to 255 on my laptop. it might differ based on operating system.