NewStaticSource returns a rand.Source that always returns the seeded value. Useful for tests.
(value int64)
| 9 | |
| 10 | // NewStaticSource returns a rand.Source that always returns the seeded value. Useful for tests. |
| 11 | func NewStaticSource(value int64) rand.Source { |
| 12 | return &staticSource{value} |
| 13 | } |
| 14 | |
| 15 | type staticSource struct { |
| 16 | value int64 |