Error represents an application-specific error. Application errors can be unwrapped by the caller to extract out the code & message. Any non-application error (such as a disk error) should be reported as an EINTERNAL error and the human user should only see "Internal error" as the message. These lo
| 27 | // message. These low-level internal error details should only be logged and |
| 28 | // reported to the operator of the application (not the end user). |
| 29 | type Error struct { |
| 30 | // Machine-readable error code. |
| 31 | Code string |
| 32 | |
| 33 | // Human-readable error message. |
| 34 | Message string |
| 35 | } |
| 36 | |
| 37 | // Error implements the error interface. Not used by the application otherwise. |
| 38 | func (e *Error) Error() string { |
nothing calls this directly
no outgoing calls
no test coverage detected