[flags] Minor updates
This commit is contained in:
parent
98607fdfe6
commit
2b86d7880c
2 changed files with 6 additions and 2 deletions
|
@ -392,7 +392,7 @@ func main_0 () (error) {
|
|||
|
||||
_sourcesFolder_0 := _flags.String ("sources", "", "<path>")
|
||||
_archiveFile_0 := _flags.String ("archive", "", "<path>")
|
||||
_compress_0 := _flags.String ("compress", "", "gzip | brotli")
|
||||
_compress_0 := _flags.String ("compress", "", "gzip | brotli | identity")
|
||||
_debug_0 := _flags.Bool ("debug", false, "")
|
||||
|
||||
FlagsParse (_flags, 0, 0)
|
||||
|
|
|
@ -31,8 +31,12 @@ func FlagsParse (_flags *flag.FlagSet, _argumentsMin uint, _argumentsMax uint) (
|
|||
_arguments := os.Args[1:]
|
||||
|
||||
if _error := _flags.Parse (_arguments); _error != nil {
|
||||
if _error == flag.ErrHelp {
|
||||
os.Exit (0)
|
||||
} else {
|
||||
AbortError (_error, fmt.Sprintf ("[8fae7a93] failed parsing arguments: `%v`!", _arguments))
|
||||
}
|
||||
}
|
||||
|
||||
_flagsNArg := uint (_flags.NArg ())
|
||||
if _argumentsMin == _argumentsMax {
|
||||
|
|
Loading…
Reference in a new issue