失败原因默认和message保持一致
This commit is contained in:
parent
e7e59267ca
commit
62d3723566
3
code.go
3
code.go
@ -57,6 +57,9 @@ func InitCodeTableWithMessage(table map[interface{}]map[string]string, convertDe
|
||||
// Date : 16:19 2023/6/9
|
||||
func InitCodeTableWithCodeList(list []Code, convertDefaultSuccessCode interface{}, convertDefaultLanguage string) {
|
||||
for _, itemCode := range list {
|
||||
if itemCode.Reason == nil || len(itemCode.Reason) == 0 {
|
||||
itemCode.Reason = itemCode.Message
|
||||
}
|
||||
codeTable[itemCode.Value] = itemCode
|
||||
}
|
||||
if nil == convertDefaultSuccessCode {
|
||||
|
Loading…
Reference in New Issue
Block a user