Documentation ¶
Overview ¶
This package provides some punk-rock reflection which is not in the stdlib.
Index ¶
Constants ¶
View Source
const TagName = "cql"
Variables ¶
This section is empty.
Functions ¶
func FieldsAndValues ¶
FieldsAndValues returns a list field names and a corresponing list of values for the given struct. For details on how the field names are determined please see StructToMap.
func MapToStruct ¶
MapToStruct converts a map to a struct. It is the inverse of the StructToMap function. For details see StructToMap.
func StructToMap ¶
StructToMap converts a struct to map. The object's default key string is the struct field name but can be specified in the struct field's tag value. The "cql" key in the struct field's tag value is the key name. Examples:
// Field appears in the resulting map as key "myName". Field int `cql:"myName"` // Field appears in the resulting as key "Field" Field int // Field appears in the resulting map as key "myName" Field int "myName"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.