github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/types2/slice.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 Slice represents a slice type. 8 type Slice struct { 9 elem Type 10 } 11 12 // NewSlice returns a new slice type for the given element type. 13 func NewSlice(elem Type) *Slice 14 15 // Elem returns the element type of slice s. 16 func (s *Slice) Elem() Type 17 18 func (s *Slice) Underlying() Type 19 func (s *Slice) String() string