修复可能的 context 泄露以及遗漏的错误处理 (#1965)

* 修复结构体 tag 字段的错误使用
This commit is contained in:
Feng.YJ
2024-12-17 16:59:06 +08:00
committed by GitHub
parent f6c2ce45c1
commit 2bf423b42f
4 changed files with 18 additions and 10 deletions
+4 -4
View File
@@ -8,10 +8,10 @@ import (
// Info 公告 结构体
type Info struct {
global.GVA_MODEL
Title string `json:"title" form:"title" gorm:"column:title;comment:公告标题;"` //标题
Content string `json:"content" form:"content" gorm:"column:content;comment:公告内容;type:text;"` //内容
UserID *int `json:"userID" form:"userID" gorm:"column:user_id;comment:发布者;"` //作者
Attachments datatypes.JSON `json:"attachments" form:"attachments" gorm:"column:attachments;comment:相关附件;"swaggertype:"array,object"` //附件
Title string `json:"title" form:"title" gorm:"column:title;comment:公告标题;"` //标题
Content string `json:"content" form:"content" gorm:"column:content;comment:公告内容;type:text;"` //内容
UserID *int `json:"userID" form:"userID" gorm:"column:user_id;comment:发布者;"` //作者
Attachments datatypes.JSON `json:"attachments" form:"attachments" gorm:"column:attachments;comment:相关附件;" swaggertype:"array,object"` //附件
}
// TableName 公告 Info自定义表名 gva_announcements_info