Format is a helper function to return an Error with a given status and formatted message.
(code Status, format string, args ...interface{})
| 121 | |
| 122 | // Format is a helper function to return an Error with a given status and formatted message. |
| 123 | func Format(code Status, format string, args ...interface{}) *Error { |
| 124 | msg := fmt.Sprintf(format, args...) |
| 125 | return &Error{ |
| 126 | Status: code, |
| 127 | Message: msg, |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | // NotFound is a helper function to return an not found Error. |
| 132 | func NotFound(format string, args ...interface{}) *Error { |
no outgoing calls
no test coverage detected
searching dependent graphs…