github.com/gopherjs/gopherjs@v1.19.0-beta1.0.20240506212314-27071a8796e4/compiler/typesutil/typelist.go (about)

     1  package typesutil
     2  
     3  import (
     4  	"go/types"
     5  	"strings"
     6  )
     7  
     8  // TypeList an ordered list of types.
     9  type TypeList []types.Type
    10  
    11  func (tl TypeList) String() string {
    12  	buf := strings.Builder{}
    13  	for i, typ := range tl {
    14  		if i != 0 {
    15  			buf.WriteString(", ")
    16  		}
    17  		buf.WriteString(types.TypeString(typ, nil))
    18  	}
    19  	return buf.String()
    20  }