File tree Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 2323 strategy :
2424 fail-fast : false
2525 matrix :
26- go-version : [ '1.18', '1.19', '1.20' ]
26+ go-version : ['1.18', '1.19', '1.20']
2727 os : [ubuntu-latest, macos-latest, windows-latest]
2828 env :
2929 OS : ${{ matrix.os }}
Original file line number Diff line number Diff line change @@ -389,19 +389,17 @@ wait for a set duration for retries.
389389
390390example of augmenting time.After with a print statement
391391
392- type struct MyTimer {}
392+ type struct MyTimer {}
393393
394394 func (t *MyTimer) After(d time.Duration) <- chan time.Time {
395395 fmt.Print("Timer called!")
396396 return time.After(d)
397397 }
398398
399- retry.Do(
400-
399+ retry.Do(
401400 func() error { ... },
402401 retry.WithTimer(&MyTimer{})
403-
404- )
402+ )
405403
406404#### type RetryIfFunc
407405
Original file line number Diff line number Diff line change 1- 4.3.3
1+ 4.3.4
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