Documentation ¶ Index ¶ type ErrorType func (u ErrorType) Code() string func (u ErrorType) Error() string func (u ErrorType) String() string func (u ErrorType) Var(params ...any) ErrorType Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type ErrorType ¶ type ErrorType string ErrorType must not modified func (ErrorType) Code ¶ func (u ErrorType) Code() string Code return the only code func (ErrorType) Error ¶ func (u ErrorType) Error() string Error return the only message func (ErrorType) String ¶ func (u ErrorType) String() string String return the error as it is func (ErrorType) Var ¶ func (u ErrorType) Var(params ...any) ErrorType Var add generic variable value to the error message for example you have UserNotFoundError ErrorType = "ER1092 User with name %s is not found" Then you can insert the name UserNotFoundError.Var("mirza") --> "User with name mirza is not found" Source Files ¶ View all Source files error.go Click to show internal directories. Click to hide internal directories.