HttpCode增加Value字段

This commit is contained in:
白茶清欢 2025-04-19 13:45:49 +08:00
parent 89d1d110dd
commit d2ee86b14f

View File

@ -13,8 +13,9 @@ import (
)
type HttpCode struct {
Code int `json:"code"`
Desc string `json:"desc"`
Value any `json:"value"`
Code int `json:"code"`
Desc string `json:"desc"`
}
func newHttpCodeData(httpCode int) HttpCode {
@ -23,8 +24,9 @@ func newHttpCodeData(httpCode int) HttpCode {
desc = fmt.Sprintf("%v: unknown error", httpCode)
}
return HttpCode{
Code: httpCode,
Desc: desc,
Value: httpCode,
Code: httpCode,
Desc: desc,
}
}