HttpCode增加Value字段

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

View File

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