Code Room
Code reviewMedium
Question
Review this Go HTTP client helper.
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 fetchStatus(url string) (int, error) { resp, err := http.Get(url) if err != nil { return 0, err } if resp.StatusCode != 200 { return resp.StatusCode, fmt.Errorf("bad status") } body, _ := io.ReadAll(resp.Body) resp.Body.Close() return len(body), nil}Run or narrate your approach, then ask the coach.