feat: 优化错误码处理
This commit is contained in:
6
code.go
6
code.go
@@ -102,6 +102,12 @@ func MessageWithoutCode() {
|
|||||||
//
|
//
|
||||||
// Date : 21:16 2022/6/25
|
// Date : 21:16 2022/6/25
|
||||||
func GetMessage(code any, defaultMessage ...string) string {
|
func GetMessage(code any, defaultMessage ...string) string {
|
||||||
|
if nil == code {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if eCode, ok := code.(Code); ok {
|
||||||
|
code = eCode.Value
|
||||||
|
}
|
||||||
var (
|
var (
|
||||||
inputCodeInfo Code
|
inputCodeInfo Code
|
||||||
exist bool
|
exist bool
|
||||||
|
|||||||
Reference in New Issue
Block a user