Documentation ¶
Index ¶
- func CheckComparableType(a interface{}) bool
- func CheckComparableTypes(objs ...interface{}) bool
- func Compare(a, b interface{}, compare Comparator) int
- func DeepEqual(a, b interface{}) bool
- func Equal(a, b interface{}) (bool, error)
- func GetValueOrFallback[T comparable](v, defaultValue T) T
- func Pointer[T any](v T) *T
- type Comparable
- type Comparator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckComparableType ¶
func CheckComparableType(a interface{}) bool
func CheckComparableTypes ¶
func CheckComparableTypes(objs ...interface{}) bool
func Compare ¶
func Compare(a, b interface{}, compare Comparator) int
func Equal ¶
object (a or b) that contains members that has equality defined will have equality defined or die.
func GetValueOrFallback ¶ added in v0.0.90
func GetValueOrFallback[T comparable](v, defaultValue T) T
Types ¶
type Comparable ¶
type Comparable interface {
Equals(a, b interface{}) bool
}
type Comparator ¶
type Comparator interface {
Compare(a, b interface{}) int
}
Click to show internal directories.
Click to hide internal directories.