validate

package
v0.0.0-...-3778cc8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BetweenOrEqual

func BetweenOrEqual[T integers](in, min, max T) error

BetweenOrEqual - returns an error if the value is less than min or greater than max.

func IsEmptyInts

func IsEmptyInts[T integers](in ...T) bool

IsEmptyInts - returns true if all values ​​are equal 0.

func IsEmptyList

func IsEmptyList[T comparable](v []T) bool

IsEmptyList - returns true if the collection is empty.

func IsEmptyStrings

func IsEmptyStrings(list ...string) bool

IsEmptyStrings - returns true if all lines are empty.

func IsNotEmptyStrings

func IsNotEmptyStrings(list ...string) bool

IsNotEmptyStrings - returns true if all strings are non-empty.

func LessOrEqualInt

func LessOrEqualInt[T integers](v, max T) error

LessOrEqualInt - returns an error if the value is greater than max.

func LessOrEqualListLen

func LessOrEqualListLen[T comparable](v []T, max int) error

LessOrEqualListLen - returns an error if the collection size is larger than max.

func LessOrEqualStringLen

func LessOrEqualStringLen(v string, max int) error

LessOrEqualStringLen - returns an error if the string length is greater than max.

func RequiredList

func RequiredList[T comparable](list []T) error

RequiredList - returns an error if the collection is empty.

func RequiredStrings

func RequiredStrings(list ...string) error

RequiredStrings - returns an error if all lines are empty.

func RequiredTime

func RequiredTime(v time.Time) error

RequiredTime - returns an error if the time is not set (January 1, year 1, 00:00:00 UTC).

Types

This section is empty.

Jump to

Keyboard shortcuts

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