refactor: mp.auth

This commit is contained in:
lab
2021-11-10 01:44:51 +08:00
parent 408a941ccf
commit 155875d2ce
38 changed files with 7542 additions and 20 deletions

View File

@@ -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 {