modulepackage
0.0.0-20240911203421-c147769a2a91
Repository: https://github.com/tech4works/checker.git
Documentation: pkg.go.dev
# README
TODO
# Functions
AllEmpty checks if all given values are empty.
AllEquals checks whether all parameters in the variadic arguments b are profoundly equal to the parameter a.
AllNil determines whether multiple values are all nil by iterating over them and checking if any of them is not nil.
AllNilOrEmpty checks whether all supplied values are nil or empty.
Contains checks if the provided value 'b' is contained within the value 'a'.
ContainsIgnoreCase checks if the provided value 'b' is contained within the value 'a', ignoring case sensitivity.
ContainsKey checks if the provided key 'key' is present in the value 'a'.
ContainsOnSlice checks if the provided value 'b' is found by the 'found' function when applied to the elements in the slice 'a'.
Equals checks whether two parameters a and b are profoundly equal.
EqualsIgnoreCase compares two values and returns true if they are equal, ignoring case.
IfEmptyReturns checks if the first parameter 'a' value is empty, and returns the second parameter 'b' if 'a' is empty.
IfNilReturns checks if the given value is nil and if so, returns the other specified value.
IsAfter determines whether the first provided time is after the second provided time.
IsAfterDate determines whether the first provided date is after the second provided date.
IsAfterNow determines whether a given time is after the current time.
IsAfterToday determines whether a given time is after today.
IsAlpha checks if the input value, when converted to string, comprises entirely of alphabetic characters.
IsAlphaSpace checks the given value, converts it to string and determines whether it consists of alphabetic characters and spaces only.
IsAndroidDeviceID determines whether a given value adheres to the standard format typically used in Android device IDs.
IsArrayType checks whether a given value is of an array type.
IsBase64 checks whether a given value is a Base64 encoded string.
IsBearer checks whether a given value carries a Bearer authentication scheme.
IsBefore determines whether a given time, a, is before another given time, b.
IsBeforeDate determines whether the date represented by the first argument is before the date represented by the second argument.
IsBeforeNow determines whether a given time is before the current time.
IsBeforeToday determines whether a given time is before the current date without considering time components.
IsBool determines whether a given value can be converted to a boolean.
IsBoolType determines whether a given value is of a bool type.
IsBytesType checks if the given value is of type []byte.
IsByteUnit validates whether the given value follows the byte unit pattern.
IsChanType checks whether the provided value is of a channel type.
IsCNPJ checks the given value, converts it to string and determines whether it forms a valid CNPJ (Cadastro Nacional da Pessoa Jurídica - Brazilian company ID).
IsCPF checks the given value, converts it to string and determines whether it forms a valid CPF (Cadastro de Pessoas Físicas - Brazilian tax ID).
IsCPFOrCNPJ checks the given value, converts it to string and determines whether it forms a valid CPF (Cadastro de Pessoas Físicas - Brazilian tax ID) or a valid CNPJ (Cadastro Nacional da Pessoa Jurídica - Brazilian company ID).
IsDocument determines the type of document (CPF or CNPJ) and checks the value based on the document type.
IsDuration checks if a given value can be parsed as a time.Duration type using the time.ParseDuration and returns a boolean value based on the parse result.
IsDurationType checks whether the given value is of the time.Duration type.
IsEmail determines whether a given value is a valid email.
IsEmpty checks if a given value is empty based on its type.
IsEnumValid checks the validity of an enumerated variable (enum).
IsErrorType checks whether the given value is of an error type.
IsFloat determines whether a given value can be parsed into a float64.
IsFloat32Type checks whether the given value is of type float32.
IsFloat64Type checks if the given value type is Float64.
IsFullName validates if a given value matches a pattern for full names.
IsFuncType checks whether the given value is a function.
IsGreaterThan compares two values of any type and returns whether the first value is greater than the second value.
IsGreaterThanOrEqual compares two values of any type and returns whether the first value is greater than or equal to the second value.
IsHTTPMethod checks if a given value matches a known HTTP method.
IsInt determines whether a given value can be converted to an integer.
IsInt16Type checks if the given value is of type int16.
IsInt32Type checks if the provided input is of type int32.
IsInt64Type checks if the provided interface value is of type Int64.
IsInt8Type checks whether a given value is of an Int8 type.
IsIntType checks whether the provided interface value is an integer type.
IsIOSDeviceID determines whether a given value adheres to the standard UUID format typically used in iOS device IDs.
IsJSON checks if a given value can be a map or a slice in JSON format.
IsLengthEquals checks whether the length or size of two parameters, a and b, are equal.
IsLengthGreaterThan compares the length or size of two values of any type and returns whether the first value is greater than the second value.
IsLengthGreaterThanOrEqual compares the length or size of two values of any type and returns whether the first value is greater than or equal to the second value.
IsLengthLessThan compares the length or size of two parameters, a and b, and returns whether the length of an is less than the length of b.
IsLengthLessThanOrEqual compares the length or size of two parameters, a and b, and returns whether the length of an is less than or equal to the length of b.
IsLengthNotEquals checks if the lengths or sizes of two parameters, a and b, are not equal.
IsLessThan compares two values of any type and returns whether the first value is less than the second value.
IsLessThanOrEqual compares two values of any type and returns whether the first value is less than or equal to the second value.
IsMap determines whether a given value is a map type.
IsMapType checks whether the provided value is a map.
IsMobileDeviceID determines whether a given value is a valid Mobile Device ID.
IsMobilePlatform checks the given value, converts it to lowercase string, and determines whether it represents a mobile platform such as Android, iOS, or iPhone OS.
IsNil determines whether a given value is nil using reflection.
IsNilOrEmpty checks whether a given value is nil or empty.
IsNotEmail verifies whether a given value is not a valid email.
IsNotEmpty checks if a given value is not empty based on its type by calling the IsEmpty function and negating its result.
IsNotFullName checks if a given value is not considered a full name.
IsNotJSON checks if the given value cannot be a JSON format, either a map or a slice.
IsNotNilOrEmpty checks whether a given value is not nil or empty.
IsNotNumeric checks whether a given value consists of non-numeric characters.
IsNumeric checks the given value, converts it to a string, and determines whether it consists of only numeric characters.
IsNumericSpace determines whether a given value is a numeric string or a string containing spaces only.
IsPointerType checks whether the given value's type is a pointer.
IsPrivateIP determines whether the provided IP address is a private IP address.
IsSlice checks if a given value is a slice.
IsSliceOfMaps checks if the given value is a slice of maps.
IsSliceOrArrayType determines whether a given value is either a slice or an array type.
IsSliceType checks whether a given value is of a slice type.
IsStringType determines whether a given value is of type string.
IsStructType determines whether a given value is of a Struct type.
IsTime checks if a given value can be converted to a time.Time type.
IsTimeType determines whether a given value is of time.Time type.
IsToday checks whether the provided value represents the current date.
IsUint16Type determines whether a given value is of type uint16.
IsUint32Type checks if a given value is of an uint32 type.
IsUint64Type verifies if a given value is of the uint64 type.
IsUint8Type inspects if the provided interface value is of type uint8.
IsUintType determines whether a given value is of the unsigned integer type.
IsURL checks the given value, converts it to string and determines whether it forms a valid URL.
IsURLPath checks whether the given value is a valid URL path.
IsValidIP checks whether a given value can be parsed as a valid IP address.
NoneEmpty determines whether all given values are not empty using the IsEmpty function.
NoneEquals checks whether all given values are profoundly not equal to each other.
NoneNil determines whether all given values are not nil.
NoneNilOrEmpty checks whether all the given values are neither nil nor empty.
NonNil determines whether a given value is not nil.
NotContains checks if the value 'b' is not contained within the value 'a'.
NotContainsIgnoreCase determines whether the provided value 'b' is not contained within the value 'a', ignoring case sensitivity.
NotContainsKey determines whether a specific 'key' is not present in the given value 'a'.
NotContainsOnSlice checks if the provided value 'b' is not present in the slice 'a'.
NotEquals checks whether two parameters a and b are not profoundly equal.
NotEqualsIgnoreCase determines whether two given values are not equal when a case is ignored.
# Constants
DocumentCNPJ represents a constant of type Document that indicates a CNPJ document.
DocumentCPF represents a constant of type Document that indicates a CPF document.
# Interfaces
BaseEnum is an interface that defines a method IsEnumValid.
# Type aliases
Document represents a custom type for different types of documents.