Code Room
Code reviewMedium
Question
Review this Go worker that sends one metric per loop iteration.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
func shipMetrics(metrics <-chan Metric) { for m := range metrics { addr, _ := net.ResolveUDPAddr("udp", "metrics.internal:8125") conn, _ := net.DialUDP("udp", nil, addr) conn.Write(encode(m)) conn.Close() }}Run or narrate your approach, then ask the coach.