Loggest thy stuff
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
322 B

  1. package slerrors
  2. type notFoundError struct {
  3. Subject string
  4. }
  5. func (err *notFoundError) Error() string {
  6. return err.Subject + " not found or inaccessible"
  7. }
  8. func NotFound(subject string) error {
  9. return &notFoundError{Subject: subject}
  10. }
  11. func IsNotFound(err error) bool {
  12. _, ok := err.(*notFoundError)
  13. return ok
  14. }