优化异常定义
This commit is contained in:
20
define.go
Normal file
20
define.go
Normal file
@ -0,0 +1,20 @@
|
||||
// Package exception ...
|
||||
//
|
||||
// Description : exception ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2023-06-09 15:54
|
||||
package exception
|
||||
|
||||
// Code 状态码的结构
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 15:55 2023/6/9
|
||||
type Code struct {
|
||||
Value interface{} `json:"value"` // 状态码的值
|
||||
Message map[string]string `json:"message"` // 状态码对应的文案(key -> 语言 , value -> 对应语言的描述)
|
||||
Reason string `json:"reason"` // 产生此错误码的原因描述
|
||||
Solution map[string]interface{} `json:"solution"` // 解决方案
|
||||
}
|
Reference in New Issue
Block a user