HttpCode增加Value字段

This commit is contained in:
zhangdeman committed 2025-04-19 13:45:49 +08:00
1 parent 89d1d110dd
commit d2ee86b14f
1 file changed
+6 -4
+6 -4
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,
}
}
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.