Canonical guidance

Use when

Avoid

Preferred pattern

tests := []struct {
	name string
	in   string
	want int
}{
	{name: "empty", in: "", want: 0},
}

Anti-pattern

Explanation: This anti-pattern is common because the pattern is popular, but forcing unrelated scenarios into one table hides intent and makes cases harder to maintain.

Why

Related pages

Sources