checkfn

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(data, elem any) (valid, found bool)

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

func IsEqual(src, dst any) bool

IsEqual determines if two objects are considered equal.

TIP: cannot compare function type

func IsHttpURL added in v0.7.0

func IsHttpURL(s string) bool

IsHttpURL check input is http/https url

func IsNil

func IsNil(v any) bool

IsNil value check

func IsNumeric added in v0.6.18

func IsNumeric(s string) bool

IsNumeric returns true if the given string is a numeric, otherwise false.

func IsPositiveNum added in v0.7.2

func IsPositiveNum(s string) bool

IsPositiveNum check input string is positive number

func IsSimpleKind added in v0.6.15

func IsSimpleKind(k reflect.Kind) bool

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

func StringsContains(ss []string, s string) bool

StringsContains check string slice contains string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL