Skip to content

Commit

Permalink
remove duplicite example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Seidl committed Oct 19, 2017
1 parent 93ed7e8 commit e06934d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,6 @@ func Retry(retryableFunction Retryable) error
```
Retry - simple retry

url := "http://example.com"
var body []byte

err := retry.Retry(
func() error {
resp, err := http.Get(url)
if err != nil {
return err
}
defer resp.Body.Close()
body, err = ioutil.ReadAll(resp.Body)
if err != nil {
return err
}

return nil
},
)

#### func RetryCustom

```go
Expand Down
19 changes: 0 additions & 19 deletions retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,6 @@ type Retryable func() error
type OnRetry func(n uint, err error)

// Retry - simple retry
//
// url := "http://example.com"
// var body []byte
//
// err := retry.Retry(
// func() error {
// resp, err := http.Get(url)
// if err != nil {
// return err
// }
// defer resp.Body.Close()
// body, err = ioutil.ReadAll(resp.Body)
// if err != nil {
// return err
// }
//
// return nil
// },
// )
func Retry(retryableFunction Retryable) error {
return RetryWithOpts(retryableFunction, NewRetryOpts())
}
Expand Down

0 comments on commit e06934d

Please sign in to comment.