Canonical guidance

Use when

Avoid

Preferred pattern

next := srv.ServeHTTP

Anti-pattern

Explanation: This is tempting because the code looks local, but closures capture variables, not magic immutable snapshots.

Why

Related pages

Sources