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

Method GetElement

orderedmap.go:60–67  ·  view source on GitHub ↗

GetElement returns the element for a key. If the key does not exist, the pointer will be nil.

(key interface{})

Source from the content-addressed store, hash-verified

58// GetElement returns the element for a key. If the key does not exist, the
59// pointer will be nil.
60func (m *OrderedMap) GetElement(key interface{}) *Element {
61 element, ok := m.kv[key]
62 if ok {
63 return element
64 }
65
66 return nil
67}
68
69// Len returns the number of elements in the map.
70func (m *OrderedMap) Len() int {

Calls

no outgoing calls