File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -355,19 +355,17 @@ wait for a set duration for retries.
355355
356356example of augmenting time.After with a print statement
357357
358- type struct MyTimer {}
358+ type struct MyTimer {}
359359
360360 func (t *MyTimer) After(d time.Duration) <- chan time.Time {
361361 fmt.Print("Timer called!")
362362 return time.After(d)
363363 }
364364
365- retry.Do(
366-
365+ retry.Do(
367366 func() error { ... },
368367 retry.WithTimer(&MyTimer{})
369-
370- )
368+ )
371369
372370#### type RetryIfFunc
373371
Original file line number Diff line number Diff line change @@ -232,19 +232,17 @@ func Context(ctx context.Context) Option {
232232//
233233// example of augmenting time.After with a print statement
234234//
235- // type struct MyTimer {}
235+ // type struct MyTimer {}
236236//
237237// func (t *MyTimer) After(d time.Duration) <- chan time.Time {
238238// fmt.Print("Timer called!")
239239// return time.After(d)
240240// }
241241//
242- // retry.Do(
243- //
242+ // retry.Do(
244243// func() error { ... },
245244// retry.WithTimer(&MyTimer{})
246- //
247- // )
245+ // )
248246func WithTimer (t Timer ) Option {
249247 return func (c * Config ) {
250248 c .timer = t
You can’t perform that action at this time.
0 commit comments