Documentation
¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
- func Filter(slice interface{}, f func(index int) bool)
- func Foreach(slice interface{}, f func(i int, v interface{}))
- func KeysOfMap(v interface{}) interface{}
- func MapInt(slice interface{}, f IntMapFunc) []int
- func MapInterface(slice interface{}, f InterfaceMapFunc) []interface{}
- func MapString(slice interface{}, f StringMapFunc) []string
- func MapT(slice interface{}, t reflect.Type, f InterfaceMapFunc) interface{}
- func MapUint(slice interface{}, f UintMapFunc) []uint
- func Reduce(slice interface{}, initReduceValue interface{}, ...) (reduceValue interface{})
- func ToMap(slice interface{}, kt reflect.Type, ...) interface{}
- func ValuesOfMap(v interface{}) interface{}
- type IntMapFunc
- type InterfaceMapFunc
- type KV
- type StringMapFunc
- type UintMapFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapInt ¶
func MapInt(slice interface{}, f IntMapFunc) []int
func MapInterface ¶
func MapInterface(slice interface{}, f InterfaceMapFunc) []interface{}
func MapString ¶
func MapString(slice interface{}, f StringMapFunc) []string
func MapT ¶
func MapT(slice interface{}, t reflect.Type, f InterfaceMapFunc) interface{}
func MapUint ¶
func MapUint(slice interface{}, f UintMapFunc) []uint
func Reduce ¶
func Reduce(slice interface{}, initReduceValue interface{}, f func(reduceValue interface{}, i int, v interface{}) interface{}) (reduceValue interface{})
func ToMap ¶
func ToMap(slice interface{},
kt reflect.Type, getK func(i int, v interface{}) interface{},
vt reflect.Type, getV func(i int, v interface{}) interface{},
) interface{}
convert a slice to a map kt, getK must not nil vt, getV can be nil value type would be interface{} when vt == nil value would be elem of slice when getV == nil
Types ¶
type IntMapFunc ¶
type InterfaceMapFunc ¶
type InterfaceMapFunc func(i int, v interface{}) interface{}
type StringMapFunc ¶
type UintMapFunc ¶
Click to show internal directories.
Click to hide internal directories.