Documentation
¶
Overview ¶
Package rtypes provides utility functions to work with runtime types.
This includes comparison of types obtained from the use of reflect package against standard Go types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert reads the type from reflection and convert it to a known public static type.
func IsEqual ¶
IsEqual returns true if the reflect and static type are nominally the same.
i.e. same import package and same name within package. For most Go programs it's sufficient to consider them equivalent without a deeper comparison of type structure.
Types ¶
type TypeComponents ¶
type TypeComponents struct { PkgPath string // Package path of type Name string // Name of type in package }
TypeComponents represents different components of a type.
func (TypeComponents) IsPrimitive ¶
func (c TypeComponents) IsPrimitive() bool
IsPrimitive returns true if the type is a built-in promitive (no import path).
Click to show internal directories.
Click to hide internal directories.