Files
go-learning/exercises/02-engineering-2026/02-context-and-resilience/README.md
T

10 lines
425 B
Markdown

# 02 — `context.Context` i Odporność (Retry + Anulowanie)
## Zadania (`resilience.go`)
1. `RetryWithContext(ctx context.Context, attempts int, delay time.Duration, fn func(context.Context) error) error` — ponawiaj `fn(ctx)` do `attempts` razy, czekając `delay` (z przerwaniem przez `ctx.Done()` w `select`).
## Uruchomienie testów
```bash
make test PKG=./exercises/02-engineering-2026/02-context-and-resilience
```