Documentation
¶
Overview ¶
Package basic contains helpers related to basic types
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToDefaultType ¶ added in v0.81.0
ConvertToDefaultType casts value to the type of defaultValue. Map types are reshaped only when coerceMaps is true (used for JSON-decoded inputs).
func StructToMap ¶ added in v0.81.0
func StructToMap(v interface{}) interface{}
StructToMap recursively converts a struct to map[string]interface{} using mapstructure tags for keys (falling back to field name). This produces only basic types that pass ValidateBasicTypes. Zero-value fields are omitted.
func ValidateBasicTypes ¶
func ValidateBasicTypes(value interface{}) bool
ValidateBasicTypes returns true if the argument is made of only basic types
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.