Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
func Equal[T comparable](a T, b T) bool
func Greater ¶
func Greater[T constraints.Ordered](a T, b T) bool
func Less ¶
func Less[T constraints.Ordered](a T, b T) bool
Types ¶
type CompareFunc ¶
type CompareKey ¶
type CompareKey[T comparable] interface { CompareKey() T }
type GTValue ¶
type GTValue[T constraints.Ordered] struct { Value T }
type LTValue ¶
type LTValue[T constraints.Ordered] struct { Value T }
type OrderKey ¶ added in v1.6.3
type OrderKey[T constraints.Ordered] interface { OrderKey() T }
comparable 只能比较是否相等,不能比较大小
Click to show internal directories.
Click to hide internal directories.