aboutsummaryrefslogtreecommitdiff
path: root/err.go
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-29 20:30:50 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-29 20:30:50 +0100
commit9578d76a8fd70ca766178175f5ba97ce284b6ff6 (patch)
tree5f545cc463bb23d57a51eb754b67c86b9943584f /err.go
Genesis commit
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)
+}