New returns an error that formats as the given text. Each call to New returns a distinct error value even if the text is identical. This wraps the standard errors.New function so that we don't need to alias that package.
(text string)
| 53 | // a distinct error value even if the text is identical. This wraps the standard |
| 54 | // errors.New function so that we don't need to alias that package. |
| 55 | func New(text string) error { |
| 56 | return errors.New(text) |
| 57 | } |
| 58 | |
| 59 | // Is wraps the standard errors.Is function so that we don't need to alias that package. |
| 60 | func Is(err, target error) bool { |
no outgoing calls
no test coverage detected