Documentation ¶
Index ¶
- func Is(err, target error) bool
- func Translate(err Error, lang string) (string, string)
- type Annotator
- func WithCode(code code.Code) Annotator
- func WithContext(context string) Annotator
- func WithID(id string) Annotator
- func WithShowMessage(showMessage bool) Annotator
- func WithText(text string) Annotator
- func WithTextTranslate(tr translate.Translate) Annotator
- func WithTitle(title string) Annotator
- func WithTitleTranslate(tr translate.Translate) Annotator
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Annotator ¶ added in v1.0.42
type Annotator func(*Error)
func WithContext ¶ added in v1.0.42
func WithShowMessage ¶ added in v1.0.42
func WithTextTranslate ¶ added in v1.0.42
func WithTitleTranslate ¶ added in v1.0.42
type Error ¶ added in v1.0.42
type Error struct { ID string Context string ShowMessage bool Code code.Code Text string TextTranslate translate.Translate TextTranslateArgs []interface{} Title string TitleTranslate translate.Translate TitleTranslateArgs []interface{} Err error }
func (Error) GetIDSuffix ¶ added in v1.0.42
func (Error) WithTextArgs ¶ added in v1.0.42
func (Error) WithTitleArgs ¶ added in v1.0.42
Click to show internal directories.
Click to hide internal directories.