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

Method NewKey

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

Source from the content-addressed store, hash-verified

1314}
1315
1316func (m *TMap) NewKey(rand *rand.Rand) int {
1317 for {
1318 k := rand.Int()
1319 if _, ok := m.std[k]; !ok {
1320 return k
1321 }
1322 }
1323}
1324
1325func (m *TMap) ExistingKey(rand *rand.Rand) int {
1326 if len(m.keys) == 0 {

Callers 2

TestMap_SetFunction · 0.45
TestMap_DeleteFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected