Skip to content

Commit

Permalink
retrybp: Minor doc comment fix for retrybp.Do
Browse files Browse the repository at this point in the history
  • Loading branch information
fishy committed Jun 18, 2020
1 parent 824cfca commit aa68921
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions retrybp/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ func GetOptions(ctx context.Context) (options []retry.Option, ok bool) {
// The changes this has compared to retry.Do are:
//
// 1. Pulling options from the context. This allows it to be used in middleware
// where you are not calling Do directly but still want to be able to
// configure retry behavior per-call.
// where you are not calling Do directly but still want to be able to configure
// retry behavior per-call.
//
// 2. If retry.Do returns a batch of errors (retry.Error), put those in a
// errorsbp.Batch from baseplate.go.
// errorsbp.Batch from baseplate.go.
func Do(ctx context.Context, fn func() error, defaults ...retry.Option) error {
options, _ := GetOptions(ctx)
options = append(defaults, options...)
Expand Down

0 comments on commit aa68921

Please sign in to comment.