var ErrFlagTerminator … type FlagNotDefinedError … func (e FlagNotDefinedError) Error() string { … } type NonFlagError … func (e NonFlagError) Error() string { … } // ParseOne sees if args[0] is present in the given flag set and if so, // sets its value and returns the flag along with the remaining (unused) arguments. // // ParseOne always returns either a non-nil Flag or a non-nil error, // and always consumes at least one argument (even on error). // // Unlike (*flag.FlagSet).Parse, ParseOne does not log its own errors. func ParseOne(fs *flag.FlagSet, args []string) (f *flag.Flag, remainingArgs []string, err error) { … } type boolFlag …