use errors.New("not found") instead of fmt.Errorf(...)
jxsl13 opened this issue · comments
John Behm commented
fmt.Errorf is usually used with the first parameter being a format string.
In your case there is a plain string used, so errors.New(..) should suffice.
If you want to be more fancy, you may implement the error interface like this
type Error string
func (e Error) Error() string {
return string(e)
}
const (
ErrNotFound = Error("not found")
)