Copy returns a new Map containing the same registered types.
()
| 221 | |
| 222 | // Copy returns a new Map containing the same registered types. |
| 223 | func (m *Map) Copy() *Map { |
| 224 | newMap := NewMap() |
| 225 | for _, type_ := range m.oidToType { |
| 226 | newMap.RegisterType(type_) |
| 227 | } |
| 228 | return newMap |
| 229 | } |
| 230 | |
| 231 | func NewMap() *Map { |
| 232 | defaultMapInitOnce.Do(initDefaultMap) |
nothing calls this directly
no test coverage detected