MCPcopy Create free account
hub / github.com/benbjohnson/immutable / NewKey

Method NewKey

immutable_test.go:2201–2208  ·  view source on GitHub ↗
(rand *rand.Rand)

Source from the content-addressed store, hash-verified

2199}
2200
2201func (m *TSortedMap) NewKey(rand *rand.Rand) int {
2202 for {
2203 k := rand.Int()
2204 if _, ok := m.std[k]; !ok {
2205 return k
2206 }
2207 }
2208}
2209
2210func (m *TSortedMap) ExistingKey(rand *rand.Rand) int {
2211 if len(m.keys) == 0 {

Callers 2

TestSortedMap_SetFunction · 0.95
TestSortedMap_DeleteFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected