> be fist commit

This commit is contained in:
2020-04-13 23:38:41 +02:00
commit 4cce632708
69 changed files with 7852 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package xlerrors
type notFoundError struct {
Subject string
}
func (err *notFoundError) Error() string {
return err.Subject + " not found"
}
func NotFound(subject string) error {
return &notFoundError{Subject: subject}
}
func IsNotFound(err error) bool {
_, ok := err.(*notFoundError)
return ok
}