mirror of
https://github.com/duke-git/lancet.git
synced 2026-03-01 00:35:28 +08:00
fix: fix ExampleContext failed
This commit is contained in:
@@ -19,15 +19,11 @@ func ExampleContext() {
|
|||||||
return errors.New("error occurs")
|
return errors.New("error occurs")
|
||||||
}
|
}
|
||||||
|
|
||||||
err := Retry(increaseNumber,
|
Retry(increaseNumber,
|
||||||
RetryDuration(time.Microsecond*50),
|
RetryDuration(time.Microsecond*50),
|
||||||
Context(ctx),
|
Context(ctx),
|
||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println(number)
|
fmt.Println(number)
|
||||||
|
|
||||||
// Output:
|
// Output:
|
||||||
|
|||||||
Reference in New Issue
Block a user