TypeForOID returns the [Type] registered for the given OID. The returned [Type] must not be mutated.
(oid uint32)
| 297 | |
| 298 | // TypeForOID returns the [Type] registered for the given OID. The returned [Type] must not be mutated. |
| 299 | func (m *Map) TypeForOID(oid uint32) (*Type, bool) { |
| 300 | if dt, ok := m.oidToType[oid]; ok { |
| 301 | return dt, true |
| 302 | } |
| 303 | |
| 304 | dt, ok := defaultMap.oidToType[oid] |
| 305 | return dt, ok |
| 306 | } |
| 307 | |
| 308 | // TypeForName returns the [Type] registered for the given name. The returned [Type] must not be mutated. |
| 309 | func (m *Map) TypeForName(name string) (*Type, bool) { |
no outgoing calls