conf: show help before error exit

This commit is contained in:
nadoo 2018-01-04 15:26:18 +08:00
parent 13bc2d4a2e
commit ee9a8ceb3a

View File

@ -47,6 +47,7 @@ func confInit() {
flag.Usage = usage
err := flag.Parse()
if err != nil {
flag.Usage()
fmt.Fprintf(os.Stderr, "ERROR: %s\n", err)
os.Exit(-1)
}