refactor: mp.auth
This commit is contained in:
@@ -13,8 +13,11 @@ func (err Error) IsZero() bool {
|
||||
}
|
||||
|
||||
func (err Error) Error() string {
|
||||
text := ErrCodeText[err.Code]
|
||||
return fmt.Sprintf("%d:%s, %s", err.Code, err.Msg, text)
|
||||
text, ok := ErrCodeText[err.Code]
|
||||
if ok {
|
||||
return fmt.Sprintf("%d:%s, %s", err.Code, err.Msg, text)
|
||||
}
|
||||
return fmt.Sprintf("%d:%s", err.Code, err.Msg)
|
||||
}
|
||||
|
||||
func (err Error) Err() error {
|
||||
|
||||
Reference in New Issue
Block a user