package
0.2.1
Repository: https://github.com/tbd54566975/golang-tools.git
Documentation: pkg.go.dev

# Packages

The genericfeatures package provides utilities for detecting usage of generic programming in Go packages.

# Functions

CoreType returns the core type of T or nil if T does not have a core type.
Deref returns the type of the variable pointed to by t, if t's core type is a pointer; otherwise it returns t.
GenericAssignableTo is a generalization of types.AssignableTo that implements the following rule for uninstantiated generic types: If V and T are generic named types, then V is considered assignable to T if, for every possible instantiation of V[A_1, ..., A_N], the instantiation T[A_1, ..., A_N] is valid and V[A_1, ..., A_N] implements T[A_1, ..., A_N].
InterfaceTermSet computes the normalized terms for a constraint interface, returning an error if the term set cannot be computed or is empty.
IsTypeParam reports whether t is a type parameter (or an alias of one).
MustDeref returns the type of the variable pointed to by t.
NormalTerms returns a slice of terms representing the normalized structural type restrictions of a type, if any.
PackIndexExpr returns an *ast.IndexExpr or *ast.IndexListExpr, depending on the cardinality of indices.
StructuralTerms returns a slice of terms representing the normalized structural type restrictions of a type parameter, if any.
UnionTermSet computes the normalized terms for a union, returning an error if the term set cannot be computed or is empty.
UnpackIndexExpr extracts data from AST nodes that represent index expressions.

# Variables

No description provided by the author

# Structs

Free is a memoization of the set of free type parameters within a type.