github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/types2/map.go (about) 1 // Copyright 2011 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package types2 6 7 // A Map represents a map type. 8 type Map struct { 9 key, elem Type 10 } 11 12 // NewMap returns a new map for the given key and element types. 13 func NewMap(key, elem Type) *Map 14 15 // Key returns the key type of map m. 16 func (m *Map) Key() Type 17 18 // Elem returns the element type of map m. 19 func (m *Map) Elem() Type 20 21 func (t *Map) Underlying() Type 22 func (t *Map) String() string