Documentation
¶
Overview ¶
Package utils contains various utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecomposeField ¶ added in v0.1.5
DecomposeField returns the decomposed type of the struct containing the field, as well as the field's name. If the referenced struct's type is not a named type, the type path and name will both be empty strings.
func DecomposeFunction ¶ added in v0.1.5
DecomposeFunction returns the path, receiver, and name strings of a ssa.Function. For functions that have no receiver, returns an empty string for recv. For shared functions (wrappers and error.Error), returns an empty string for path. Panics if provided a nil argument.
func DecomposeType ¶ added in v0.1.5
DecomposeType returns the path and name of a Named type Returns empty strings if the type is not *types.Named
func Dereference ¶
Dereference returns the underlying type of a pointer. If the input is not a pointer, then the type of the input is returned.
func UnqualifiedName ¶ added in v0.1.5
UnqualifiedName returns the name of the given type, without the qualifying prefix containing the package in which it was declared. Example: for a type named T declared in package p, the returned string will be just `T` instead of `p.T`.
Types ¶
This section is empty.