Reset resets the generated ID back to zero. Should only be used at initialization or by tests sensitive to the ID number.
()
| 214 | // Reset resets the generated ID back to zero. Should only be used at |
| 215 | // initialization or by tests sensitive to the ID number. |
| 216 | func (i *IDGenerator) Reset() { |
| 217 | atomic.StoreInt64(&i.id, 0) |
| 218 | } |
| 219 | |
| 220 | func (i *IDGenerator) genID() int64 { |
| 221 | return atomic.AddInt64(&i.id, 1) |
no outgoing calls