Documentation ¶
Index ¶
Constants ¶
View Source
const ( Ldate = 1 << iota Ltime Lmicroseconds Llongfile Lshortfile LUTC LstdFlags = Ldate | Ltime MaxOutput = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseErrMsg ¶
type CustomErrMsg ¶
type CustomErrMsg BaseErrMsg
type Error ¶
type Error struct { ErrCode ErrCode `json:"err_code"` // The message of the error. ErrMsg string `json:"err_msg"` // The message of the error. ErrMsgEn string `json:"err_msg_en"` }
Error holds the error message, this message never really changes
func New ¶
func New(errCode ErrCode, errMsg ...CustomErrMsg) Error
New creates and returns an Error with a pre-defined user output message
func (Error) MarshalString ¶
Click to show internal directories.
Click to hide internal directories.