aboutsummaryrefslogtreecommitdiff
path: root/err.go
diff options
context:
space:
mode:
Diffstat (limited to 'err.go')
-rw-r--r--err.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/err.go b/err.go
new file mode 100644
index 0000000..b964c11
--- /dev/null
+++ b/err.go
@@ -0,0 +1,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)
+}