Documentation ¶
Overview ¶
The genericfeatures package provides utilities for detecting usage of generic programming in Go packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Features ¶
type Features int
Features is a set of flags reporting which features of generic Go code a package uses, or 0.
const ( // GenericTypeDecls indicates whether the package declares types with type // parameters. GenericTypeDecls Features = 1 << iota // GenericFuncDecls indicates whether the package declares functions with // type parameters. GenericFuncDecls // EmbeddedTypeSets indicates whether the package declares interfaces that // contain structural type restrictions, i.e. are not fully described by // their method sets. EmbeddedTypeSets // TypeInstantiation indicates whether the package instantiates any generic // types. TypeInstantiation // FuncInstantiation indicates whether the package instantiates any generic // functions. FuncInstantiation )
func ForPackage ¶
ForPackage computes which generic features are used directly by the package being analyzed.
Click to show internal directories.
Click to hide internal directories.