package slerrors type notFoundError struct { Subject string } func (err *notFoundError) Error() string { return err.Subject + " not found or inaccessible" } func NotFound(subject string) error { return ¬FoundError{Subject: subject} } func IsNotFound(err error) bool { _, ok := err.(*notFoundError) return ok }