Where can I query the golang structure tag?

There seem to be many kinds of

golang structure tag, such as the following:

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"`
}

the common ones are json, bson, gorm, sql and so on. What kind of tag? should be queried everywhere?

Dec.13,2021
The

structure tag is customized, and different third-party modules have different requirements for tag, depending on which module you use.


  1. traverse all tag information
  2. regular match: the preceding string is stored using a structure
  3. fetch weight output
Menu