Closed plucky-groove3 closed 3 years ago
func main() { if _, err := parser.Parse(); err != nil { switch flagsErr := err.(type) { case flags.ErrorType: if flagsErr == flags.ErrHelp { os.Exit(0) } os.Exit(1) default: os.Exit(1) } } }
the example goes wrong with Release v1.4.0 , 'ErrorType' needs an 'Error' method. just like...
func (e ErrorType) Error() string { return e.String() }
https://github.com/jessevdk/go-flags/blob/c17162fe8fd74f119ff938c5c67af63e3bac5ded/error.go#L100-L102
Will release new version, see https://github.com/jessevdk/go-flags/issues/345
the example goes wrong with Release v1.4.0 , 'ErrorType' needs an 'Error' method. just like...