func WithMaxBackoff(maxBackoff time.Duration) Option {
	return func(o *options) {
		o.maxBackoff = maxBackoff
	}
}
WithMaxBackoff sets upper limit on backoff duration.

Max backoff of 0 indicates no limit.

If max backoff option is not used, then default value of 2 seconds is used.
package retry
import (
	"context"
	"math"
	"math/rand"
	"time"
)
func Do(ctx context.Context, action func() error, options ...Option) error {
	var lastActionErr error
	for r := Start(ctx, options...); r.Next(); {
		lastActionErr = action()
		if lastActionErr == nil {
			return nil
		}
	}
	if lastActionErr == nil {  
		return ctx.Err()
	}
	return lastActionErr
}
type Retrier interface {
	Reset()
	Next() bool
	CurrentAttempt() int
}
type Option func(r *options)
func WithMaxAttempts(maxAttempts int) Option {
	return func(o *options) {
		o.maxAttempts = maxAttempts
	}
}
func WithInitialBackoff(initialBackoff time.Duration) Option {
	return func(o *options) {
		o.initialBackoff = initialBackoff
	}
}