Canonical guidance

Use when

Avoid

Preferred pattern

type User struct {
	ID   string
	Name string
}

Anti-pattern

Explanation: This is tempting because it is short, but keyed literals survive field reordering and make reviews clearer.

Why

Related pages

Sources