Canonical guidance

Use when

Avoid

Preferred pattern

ticker := time.NewTicker(30 * time.Second)
defer ticker.Stop()

Anti-pattern

Explanation: This anti-pattern is tempting because periodic work looks harmless, but it quietly creates runaway background loops.

Why

Related pages

Sources