NotFound generates a 404 error.
(id, format string, a ...interface{})
| 108 | |
| 109 | // NotFound generates a 404 error. |
| 110 | func NotFound(id, format string, a ...interface{}) error { |
| 111 | if id == "" { |
| 112 | id = DefaultNotFoundID |
| 113 | } |
| 114 | return &Error{ |
| 115 | ID: id, |
| 116 | Code: http.StatusNotFound, |
| 117 | Detail: fmt.Sprintf(format, a...), |
| 118 | Status: http.StatusText(http.StatusNotFound), |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | // MethodNotAllowed generates a 405 error. |
| 123 | func MethodNotAllowed(id, format string, a ...interface{}) error { |
no outgoing calls
no test coverage detected