Code Room
Code reviewHard
Question
Review this Go retry helper used by every instance of a fleet to call a shared downstream. It already retries on error.
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 fetch(ctx context.Context, url string) (*http.Response, error) { var lastErr error for i := 0; i < 5; i++ { resp, err := http.Get(url) if err == nil && resp.StatusCode < 500 { return resp, nil } lastErr = err time.Sleep(50 * time.Millisecond) } return nil, lastErr}Run or narrate your approach, then ask the coach.