blob: cbe96b4e957f0f0b5a442aa403c4854f1a26fd29 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package opts
import "fmt"
// A BadOptionError describes an option that the user attempted to pass
// which the developer did not register.
type BadOptionError rune
func (e BadOptionError) Error() string {
return fmt.Sprintf("unknown option ā%cā", e)
}
// A NoArgumentError describes an option that the user attempted to pass
// without an argument, which required an argument.
type NoArgumentError rune
func (e NoArgumentError) Error() string {
return fmt.Sprintf("expected argument for option ā%cā", e)
}
|