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

Function NewOrderedMapWithElements

v2/orderedmap.go:22–28  ·  view source on GitHub ↗
(els ...*Element[K, V])

Source from the content-addressed store, hash-verified

20}
21
22func NewOrderedMapWithElements[K comparable, V any](els ...*Element[K, V]) *OrderedMap[K, V] {
23 om := NewOrderedMapWithCapacity[K, V](len(els))
24 for _, el := range els {
25 om.Set(el.Key, el.Value)
26 }
27 return om
28}
29
30// Get returns the value for a key. If the key does not exist, the second return
31// parameter will be false and the value will be nil.

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…