Canonical guidance

Use when

Avoid

Preferred pattern

func TestParse(t *testing.T) {
	t.Parallel()

	got, err := Parse("x=1")
	if err != nil {
		t.Fatal(err)
	}
	if got["x"] != "1" {
		t.Fatalf("x = %q", got["x"])
	}
}

Anti-pattern

Explanation: This anti-pattern is tempting because stable order hides shared-state bugs, but real test confidence comes from independence, not luck.

Why

Related pages

Sources