Documentation
¶
Index ¶
- func Compare(a, b any, op string) error
- func NewNotLesserThanError(left, right any) *notLesserThanError
- type EqualError
- type NotEqualError
- type NotGreaterThanError
- type NotGreaterThanOrEqualError
- type NotLesserThanOrEqualError
- type Operator
- type OperatorNotSupportedError
- type TypeMismatchError
- type TypeNotSupportedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNotLesserThanError ¶
func NewNotLesserThanError(left, right any) *notLesserThanError
NewNotLesserThanError creates a new notLesserThanError.
Types ¶
type EqualError ¶
EqualError is returned when two values are equal, but should not be.
func NewEqualError ¶
func NewEqualError(left, right any) *EqualError
NewEqualError creates a new EqualError.
type NotEqualError ¶
NotEqualError is returned when two values are not equal, but should be. For example, when comparing 1 to 2.
func NewNotEqualError ¶
func NewNotEqualError(left, right any) *NotEqualError
NewNotEqualError creates a new NotEqualError.
func (*NotEqualError) Error ¶
func (e *NotEqualError) Error() string
Error returns the error message.
type NotGreaterThanError ¶
NotGreaterThanError is returned when a value is not greater than another.
func NewNotGreaterThanError ¶
func NewNotGreaterThanError(left, right any) *NotGreaterThanError
NewNotGreaterThanError creates a new NotGreaterThanError.
func (*NotGreaterThanError) Error ¶
func (e *NotGreaterThanError) Error() string
Error returns the error message.
type NotGreaterThanOrEqualError ¶
NotGreaterThanOrEqualError is returned when a value is not greater than or equal to another.
func NewNotGreaterThanOrEqualError ¶
func NewNotGreaterThanOrEqualError(left, right any) *NotGreaterThanOrEqualError
NewNotGreaterThanOrEqualError creates a new NotGreaterThanOrEqualError.
func (*NotGreaterThanOrEqualError) Error ¶
func (e *NotGreaterThanOrEqualError) Error() string
Error returns the error message.
type NotLesserThanOrEqualError ¶
NotLesserThanOrEqualError is returned when a value is not lesser than or equal to another.
func NewNotLesserThanOrEqualError ¶
func NewNotLesserThanOrEqualError(left, right any) *NotLesserThanOrEqualError
NewNotLesserThanOrEqualError creates a new NotLesserThanOrEqualError.
func (*NotLesserThanOrEqualError) Error ¶
func (e *NotLesserThanOrEqualError) Error() string
Error returns the error message.
type OperatorNotSupportedError ¶
type OperatorNotSupportedError struct {
Operator string
}
OperatorNotSupportedError is returned when an operator is not supported.
func NewOperatorNotSupportedError ¶
func NewOperatorNotSupportedError(op string) *OperatorNotSupportedError
NewOperatorNotSupportedError creates a new OperatorNotSupportedError.
func (*OperatorNotSupportedError) Error ¶
func (e *OperatorNotSupportedError) Error() string
Error returns the error message.
type TypeMismatchError ¶
TypeMismatchError is returned when a type mismatch is detected. For example, when comparing a string to an integer.
func NewTypeMismatchError ¶
func NewTypeMismatchError(expected, actual any) *TypeMismatchError
NewTypeMismatchError creates a new TypeMismatchError.
func (*TypeMismatchError) Error ¶
func (e *TypeMismatchError) Error() string
Error returns the error message.
type TypeNotSupportedError ¶
type TypeNotSupportedError struct {
Type any
}
TypeNotSupportedError is returned when a type is not supported.
func NewTypeNotSupportedError ¶
func NewTypeNotSupportedError(t any) *TypeNotSupportedError
NewTypeNotSupportedError creates a new TypeNotSupportedError.
func (*TypeNotSupportedError) Error ¶
func (e *TypeNotSupportedError) Error() string
Error returns the error message.