GetElement returns the element for a key. If the key does not exist, the pointer will be nil.
(key interface{})
| 58 | // GetElement returns the element for a key. If the key does not exist, the |
| 59 | // pointer will be nil. |
| 60 | func (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. |
| 70 | func (m *OrderedMap) Len() int { |
no outgoing calls