Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnclosingSignature ¶
EnclosingSignature returns the signature of the innermost function enclosing the syntax node denoted by cur. It returns nil if the node is not within a function, or the function's type information is missing.
func FormatTypeParams ¶
func FormatTypeParams(tparams *types.TypeParamList) string
FormatTypeParams turns TypeParamList into its Go representation, such as: [T, Y]. Note that it does not print constraints as this is mainly used for formatting type params in method receivers.
func TypesFromContext ¶
TypesFromContext returns the type (or perhaps zero or multiple types) of the "hole" into which the expression identified by path must fit.
For example, given
s, i := "", 0 s, i = EXPR
the hole that must be filled by EXPR has type (string, int).
It returns nil on failure.
Types ¶
This section is empty.