Documentation ¶
Index ¶
- func ConvMapToSlice(m interface{}, s interface{})
- func ConvSliceToLookupTable(s interface{}) map[interface{}]bool
- func ConvSliceToMap(s interface{}, m interface{})
- func ElemType(i interface{}) reflect.Type
- func ElemValue(i interface{}) reflect.Value
- func FieldNames(i interface{}) []string
- func FieldValues(i interface{}) []interface{}
- func IsNil(i interface{}) bool
- func IsTypeInitValue(i interface{}) bool
- func MergeMaps(out interface{}, ms ...interface{})
- func SlicePluck(s0 interface{}, fieldName string, s1 interface{}) error
- func Strings(s interface{}) ([]string, error)
- func SumSlice(s interface{}, m interface{})
- func ToMap(i interface{}) map[interface{}]interface{}
- func ToSlice(i interface{}) []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvMapToSlice ¶
func ConvMapToSlice(m interface{}, s interface{})
ConvMapToSlice convert map to slice, m must be map, s must be slice ptr
func ConvSliceToLookupTable ¶
func ConvSliceToLookupTable(s interface{}) map[interface{}]bool
ConvSliceToLookupTable convert slice to look up table
func ConvSliceToMap ¶
func ConvSliceToMap(s interface{}, m interface{})
ConvSliceToMap,s must be slice, and slice item must be Key() and Value() method, m must be map[Key()]Value() if args does not conform to specification, will panic
func FieldNames ¶
func FieldNames(i interface{}) []string
func FieldValues ¶
func FieldValues(i interface{}) []interface{}
func IsTypeInitValue ¶
func IsTypeInitValue(i interface{}) bool
func MergeMaps ¶
func MergeMaps(out interface{}, ms ...interface{})
MergeMaps merge maps, the map key -> value must be have Merge method
func SlicePluck ¶
SlicePluck slice elem one filedName
s0 := []struct{ Name string Gender int }{...}
var s1 []int SlicePluck(s0, "Gender", &s1)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.