package checkfn
Import Path
github.com/gookit/goutil/internal/checkfn (on go.dev)
Dependency Relation
imports 6 packages, and imported by 4 packages
Package-Level Functions (total 10)
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.
IndexByteAfter find index of byte after startIndex. return -1 if not found
eg:
IndexByteAfter("abcabc", 'b', 0) = 1
IndexByteAfter("abcabc", 'b', 2) = 4
IsEqual determines if two objects are considered equal.
TIP: cannot compare function type
IsHttpURL check input is http/https url
IsNil value check
IsNumeric returns true if the given string is a numeric, otherwise false.
IsPositiveNum check input string is positive number
IsSimpleKind kind in: string, bool, intX, uintX, floatX
IsWSL system env
https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364
StringsContains check string slice contains sub-string
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |