code: func exportedType(typ types.Type) bool {
  	switch T := typ.(type) {
  	case *types.Named:
  		// Builtin types have no package.
  		return T.Obj().Pkg() == nil || T.Obj().Exported()
  	case *types.Map:
  		return exportedType(T.Key()) && exportedType(T.Elem())
  	case interface {
  		Elem() types.Type
  	}: // array, slice, pointer, chan
  		return exportedType(T.Elem())
  	}
  	// Be conservative about other types, such as struct, interface, etc.
  	return true
  }
docs: // exportedType reports whether typ is an exported type.
  // It is imprecise, and will err on the side of returning true,
  // such as for composite types.