Canonical guidance

Use when

Avoid

Preferred pattern

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Anti-pattern

Explanation: This anti-pattern is tempting because tags look lightweight, but hidden metadata quickly becomes hard to reason about and refactor.

Why

Related pages

Sources