golang结构体tag好像有很多种,比如下面:
type BaseModel struct {
Id uint64 `json:"id" gorm:"primary_key;auto_increment"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"-" sql:"index"`
}
常见的有json、bson、gorm、sql等等,应该哪里查询都有哪些tag?
结构体tag都是自定义的,不同的第三方模块对tag的要求不一样,要看你用什么模块。