Code Room
Code reviewHard
Question
Review this Go retry wrapper used across many concurrent goroutines.
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 withRetry(ctx context.Context, fn func() error) error { var err error for attempt := 0; attempt < 5; attempt++ { err = fn() if err == nil { return nil } delay := time.Duration(attempt*attempt) * time.Second time.Sleep(delay) } return err}Run or narrate your approach, then ask the coach.