You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
306 B
18 lines
306 B
package slerrors
|
|
|
|
type notFoundError struct {
|
|
Subject string
|
|
}
|
|
|
|
func (err *notFoundError) Error() string {
|
|
return err.Subject + " not found"
|
|
}
|
|
|
|
func NotFound(subject string) error {
|
|
return ¬FoundError{Subject: subject}
|
|
}
|
|
|
|
func IsNotFound(err error) bool {
|
|
_, ok := err.(*notFoundError)
|
|
return ok
|
|
}
|