Documentation ¶
Index ¶
- func Contains(src []interface{}, test interface{}) bool
- func ContainsDeep(src []interface{}, test interface{}) bool
- func ConvertAny2Interface(src interface{}) ([]interface{}, error)
- func IndexOf(element string, data []string) int
- func IndexOfAny(target interface{}, anySlice interface{}) (int, error)
- func InterfaceSlice2StringSlice(strSlice []interface{}) []string
- func IsEmpty(src interface{}) bool
- func StringContains(src []string, test string) bool
- func StringFilter(src []string, fn func(item string) bool) []string
- func StringSlice2InterfaceSlice(strSlice []string) []interface{}
- func TakeSliceArg(arg interface{}) (out []interface{}, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(src []interface{}, test interface{}) bool
Contains asserts src contains test
func ContainsDeep ¶
func ContainsDeep(src []interface{}, test interface{}) bool
ContainsDeep asserts src contains test using reflect.DeepEqual
func ConvertAny2Interface ¶
func ConvertAny2Interface(src interface{}) ([]interface{}, error)
ConvertAny2Interface converts interface src to interface slice
func IndexOfAny ¶
IndexOfAny returns index of element in slice data
func InterfaceSlice2StringSlice ¶
func InterfaceSlice2StringSlice(strSlice []interface{}) []string
InterfaceSlice2StringSlice converts interface slice to string slice
func StringContains ¶
StringContains asserts src contains test
func StringFilter ¶
StringFilter filters string slice by callback function fn If fn returns true, the item will be appended to result
func StringSlice2InterfaceSlice ¶
func StringSlice2InterfaceSlice(strSlice []string) []interface{}
StringSlice2InterfaceSlice converts string slice to interface slice
func TakeSliceArg ¶
func TakeSliceArg(arg interface{}) (out []interface{}, ok bool)
TakeSliceArg https://ahmet.im/blog/golang-take-slices-of-any-type-as-input-parameter/
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.