Documentation
¶
Overview ¶
Package validate provides small validation helpers for primitive packages. Product validation policy, schema frameworks, and user-facing messages stay with callers.
Package validate provides small validation helpers for primitive packages.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRequired reports a missing required value. ErrRequired = errors.New("required") // ErrInvalid reports a value outside its valid semantic space. ErrInvalid = errors.New("invalid") )
Functions ¶
func Equal ¶
func Equal[T comparable](field string, got, want T) error
Equal returns an error when got and want differ.
func IsNil ¶ added in v0.9.0
IsNil reports whether value is nil, including an interface containing a typed nil value of a nilable kind.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.