Documentation
¶
Index ¶
- func Contains(data, elem any) (valid, found bool)
- func IsEqual(src, dst any) bool
- func IsHttpURL(s string) bool
- func IsNil(v any) bool
- func IsNumeric(s string) bool
- func IsPositiveNum(s string) bool
- func IsSimpleKind(k reflect.Kind) bool
- func IsWSL() bool
- func StringsContains(ss []string, s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
Contains try loop over the data check if the data includes the element.
data allow types: string, map, array, slice
map - check key exists string - check sub-string exists array,slice - check sub-element exists
Returns:
- valid: data is valid
- found: element was found
return (false, false) if impossible. return (true, false) if element was not found. return (true, true) if element was found.
func IsEqual ¶ added in v0.6.15
IsEqual determines if two objects are considered equal.
TIP: cannot compare function type
func IsNumeric ¶ added in v0.6.18
IsNumeric returns true if the given string is a numeric, otherwise false.
func IsPositiveNum ¶ added in v0.7.2
IsPositiveNum check input string is positive number
func IsSimpleKind ¶ added in v0.6.15
IsSimpleKind kind in: string, bool, intX, uintX, floatX
func IsWSL ¶ added in v0.7.0
func IsWSL() bool
IsWSL system env https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364
func StringsContains ¶ added in v0.6.18
StringsContains check string slice contains string
Types ¶
This section is empty.