Canonical guidance

Use when

Avoid

Preferred pattern

out := make(chan Item)
go func() {
	defer close(out)
	for _, item := range items {
		out <- item
	}
}()

Anti-pattern

Explanation: This anti-pattern is tempting because channels feel idiomatic, but overly complex channel graphs often hide ownership and shutdown mistakes.

Why

Related pages

Sources