Struct tags

Struct tags are metadata strings attached to Go struct fields to control how external tools process the data.

Struct tags are key-value pairs attached to struct fields that provide metadata for external tools like JSON encoders or database mappers. They are defined as backtick-quoted strings immediately following a field declaration.

type User struct {
    Name string `json:"name"`
    Age  int    `json:"age"`
}