File: doc.go

package info (click to toggle)
golang-github-matryer-try 1%2Bgit20161228.6.9ac251b-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 88 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 322 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
// Package try provides retry functionality.
//     var value string
//     err := try.Do(func(attempt int) (bool, error) {
//       var err error
//       value, err = SomeFunction()
//       return attempt < 5, err // try 5 times
//     })
//     if err != nil {
//       log.Fatalln("error:", err)
//     }
package try