VividCortex/robustly — pull request #5 by wfreeman (2013-12-18 04:41:34+00:00)
Title: adding log instead of fmt for output. adding RunOptions, a bit of cleanu...

Note: breaking API changes.

I implemented your optional parameters via a struct instead of a variadic function, and a second function called RunWithOptions that takes the struct. It makes it a little easier to do them in a typed way, and makes the API clearer. For example:

```
robustly.RunWithOptions(function, robustly.RunOptions{
RateLimit: 1.0,
Timeout: 1 * time.Second,
PrintStack: false,
Delay: 0 * time.Nanosecond,
}
})
```

I also added a Delay option, which is for my own use case, to avoid CPU spin on a loop of errors.

If you guys like this, but want me to tweak anything, let me know.