Code Room
Code reviewMediumcr-g420
Subject Goroutine leaksLevel Mid–Senior~26 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Go retry helper that re-issues an operation with backoff until it succeeds or the context is cancelled.

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.

Talk through your review
Code to reviewgo
func RetryUntil(ctx context.Context, op func() error) error {	for {		if err := op(); err == nil {			return nil		}		select {		case <-time.After(backoff):			// retry		case <-ctx.Done():			return ctx.Err()		}	}}
Run or narrate your approach, then ask the coach.