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
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32406-2bde3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32406-2bde3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?