MCPcopy Create free account
hub / github.com/elliotchance/orderedmap / NewOrderedMapWithCapacity

Function NewOrderedMapWithCapacity

orderedmap.go:16–20  ·  view source on GitHub ↗

NewOrderedMapWithCapacity creates a map with enough pre-allocated space to hold the specified number of elements.

(capacity int)

Source from the content-addressed store, hash-verified

14// NewOrderedMapWithCapacity creates a map with enough pre-allocated space to
15// hold the specified number of elements.
16func NewOrderedMapWithCapacity(capacity int) *OrderedMap {
17 return &OrderedMap{
18 kv: make(map[interface{}]*Element, capacity),
19 }
20}
21
22// Get returns the value for a key. If the key does not exist, the second return
23// parameter will be false and the value will be nil.

Callers 2

CopyMethod · 0.70

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…