Code Room
Code reviewHard
Question
Review this Go function that fans out HTTP requests and collects the first success.
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 firstOK(urls []string) (*http.Response, error) { ch := make(chan *http.Response) for _, u := range urls { go func(u string) { resp, err := http.Get(u) if err == nil { ch <- resp } }(u) } return <-ch, nil}Run or narrate your approach, then ask the coach.