Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorMessage ¶
ErrorMessage unwraps an application error and returns its message. Non-application errors always return "Internal error".
func HasPrefixes ¶
HasPrefixes returns true if the string s has any of the given prefixes.
func ValidateEmail ¶ added in v0.4.1
ValidateEmail validates the email.
Types ¶
type Code ¶
type Code int
Code is the error code.
type Error ¶
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 Internal error and the human user should only see "Internal error" as the message. These low-level internal error details should only be logged and reported to the operator of the application (not the end user).