Documentation
¶
Overview ¶
Package genr provides with utilities to generate codes It builds a user defined type `typeName` with type argument `valueType`, to emulate a generic type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IntConfig ¶
type IntConfig struct { // Name of the data type. Name string // ValType is the actual underlying int type, such as int32. ValType string // ValLen specifies the length of ValType ValLen int // Codec defines the name of function to decode raw bytes into ValType. Codec string // EncodeCast defines a cast type/function to convert values before encode. // Because sometimes encoder does not provides a exact type. EncodeCast string }
IntConfig defines a integer type based template redner config.
func NewIntConfig ¶
NewIntConfig build a IntConfig for a user defined type `typeName` with type argument valueType, to emulate a generic type.
Click to show internal directories.
Click to hide internal directories.