Documentation ¶ Index ¶ Variables func Do(max int, f func(int) (bool, error)) error Constants ¶ This section is empty. Variables ¶ View Source var ( // ErrTooManyRetries indicates that an operation did not complete within // configured retry count. ErrTooManyRetries = fmt.Errorf("too many retries") ) Functions ¶ func Do ¶ func Do(max int, f func(int) (bool, error)) error Do tries the function f until max attempts is reached. If f returns a true bool or a nil error retries are stopped and the error is returned. Types ¶ This section is empty. Source Files ¶ View all Source files try.go Click to show internal directories. Click to hide internal directories.