github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20210608095005-9e0b26f200fb/tests/integration/v2/incrementing_nonce.go (about) 1 package tests 2 3 import ( 4 "fmt" 5 ) 6 7 // IncrementingNonceGenerator starts at nonce1 and increments each by +1: nonce1, nonce2, ..., nonceN 8 type IncrementingNonceGenerator struct { 9 nonce int 10 } 11 12 // GetNonce returns an incrementing nonce value. 13 func (m *IncrementingNonceGenerator) GetNonce() string { 14 m.nonce++ 15 return fmt.Sprintf("nonce%d", m.nonce) 16 }