// Package tmap provides type mapping facility that maps type id to type name.
package tmap // Map is type mapping. type Map struct { types map[uint32]string } func ( *Map) ( map[uint32]string) { for , := range { .types[] = } } // Get returns type string or blank. func ( *Map) ( uint32) string { if == nil || len(.types) == 0 { return "" } return .types[] } // New creates new Map from mappings. func ( ...map[uint32]string) *Map { := &Map{ types: map[uint32]string{}, } for , := range { .add() } return }