优化code reason定义
This commit is contained in:
		| @ -15,7 +15,7 @@ package exception | ||||
| type Code struct { | ||||
| 	Value   interface{}       `json:"value"`   // 状态码的值 | ||||
| 	Message map[string]string `json:"message"` // 状态码对应的文案(key -> 语言 , value -> 对应语言的描述) | ||||
| 	Reason  map[string][]*CodeReason `json:"reason"`  // 产生此错误码的原因描述(key -> 语言 , value -> 对应语言的原因列表) | ||||
| 	Reason  []*CodeReason     `json:"reason"`  // 产生此错误码的原因描述(key -> 语言 , value -> 对应语言的原因列表) | ||||
| } | ||||
|  | ||||
| // CodeReason 错误码的原因 | ||||
| @ -24,6 +24,6 @@ type Code struct { | ||||
| // | ||||
| // Date : 00:31 2023/11/5 | ||||
| type CodeReason struct { | ||||
| 	Reason   string   `json:"reason"`   // 错误原因: 语言 => 原因 | ||||
| 	Solution []string `json:"solution"` // 解决步骤. 语言 => 解决步骤 | ||||
| 	Reason   map[string]string `json:"reason"`   // 错误原因: 语言 => 原因 | ||||
| 	Solution map[string]string `json:"solution"` // 解决步骤. 语言 => 解决步骤 | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user