425 B
425 B
02 — context.Context i Odporność (Retry + Anulowanie)
Zadania (resilience.go)
RetryWithContext(ctx context.Context, attempts int, delay time.Duration, fn func(context.Context) error) error— ponawiajfn(ctx)doattemptsrazy, czekającdelay(z przerwaniem przezctx.Done()wselect).
Uruchomienie testów
make test PKG=./exercises/02-engineering-2026/02-context-and-resilience