1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package opts import "fmt" type ErrBadOption rune func (e ErrBadOption) Error() string { return fmt.Sprintf("unknown option ā%cā", e) } type ErrNoArgument rune func (e ErrNoArgument) Error() string { return fmt.Sprintf("expected argument for option ā%cā", e) }