package backoff
func New(options ...Options) *backOff {
backOff := defaultBackOff()
if len(options) == 0 {
return backOff
}
// override default values
if len(options) > 1 {
panic("only 1 backOffOption allowed")
}
optn := options[0]
backOff.options = &optn
if optn.Delay_ms > 0 {
backOff.delay_ms = optn.Delay_ms
}
return backOff
}
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CANFuhy8nhhbBDWb0%3D7SLvq1aictC9GVG%3D9zpfpJ1gevDdRmd6A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CANFuhy9Aj%2Bo7M-%3Dstro5aXbjPTnCZ0y_4vYE3CAjDiBpCUhjpw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/67D5D073-044A-4274-9DF4-EE786F08AD65%40ix.netcom.com.
On May 25, 2020, at 12:51 PM, ser...@netdata.cloud wrote:
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1e07b530-7805-4221-a6a0-61de6ca219cb%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/67D5D073-044A-4274-9DF4-EE786F08AD65%40ix.netcom.com.