jessevdk/go-flags

'ErrorType' needs an 'Error' method in v1.4.0

plucky-groove3 opened this issue · 1 comments

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()
}

go-flags/error.go

Lines 100 to 102 in c17162f

func (e ErrorType) Error() string {
return e.String()
}

Will release new version, see #345