Canonical guidance

Use when

Avoid

Preferred pattern

u := User{ID: "42", Name: "Ava"}

Anti-pattern

Explanation: This is tempting because it is shorter, but the brevity is not worth the maintenance and review cost once the struct is non-trivial.

Why

Related pages

Sources