Exit immediately if -h or -help was passed.

This commit is contained in:
Stanislav Nikitin 2018-12-18 04:21:13 +05:00
parent bcad9b7ec3
commit bee236881f

View File

@ -131,5 +131,8 @@ func (f *Flagger) Parse() {
} }
logger.Print("Parsing CLI parameters:", os.Args) logger.Print("Parsing CLI parameters:", os.Args)
f.flagSet.Parse(os.Args[1:]) err := f.flagSet.Parse(os.Args[1:])
if err != nil {
os.Exit(0)
}
} }