优化reason

This commit is contained in:
zhangdeman001 committed 2023-06-09 16:22:55 +08:00
1 parent 292fcf0839
commit e7e59267ca
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ func InitCodeTableWithMessage(table map[interface{}]map[string]string, convertDe
codeTable[code] = Code{
Value: code,
Message: message,
Reason: "",
Reason: message,
Solution: map[string]interface{}{},
}
}
+1 -1
View File
@@ -15,6 +15,6 @@ package exception
type Code struct {
Value interface{} `json:"value"` // 状态码的值
Message map[string]string `json:"message"` // 状态码对应的文案(key -> 语言 , value -> 对应语言的描述)
Reason string `json:"reason"` // 产生此错误码的原因描述
Reason map[string]string `json:"reason"` // 产生此错误码的原因描述(key -> 语言 , value -> 对应语言的描述)
Solution map[string]interface{} `json:"solution"` // 解决方案
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.