Don't print help twice

This commit is contained in:
Jakob Borg 2014-01-12 14:47:04 -07:00
parent af399ae9f3
commit fc2b557ae6

View File

@ -75,6 +75,11 @@ var (
func main() {
_, err := flags.Parse(&opts)
if err != nil {
if err, ok := err.(*flags.Error); ok {
if err.Type == flags.ErrHelp {
os.Exit(0)
}
}
fatalln(err)
}