Documentation
¶
Overview ¶
Package types implements the functions, types, and interfaces for the module.
Package types implements the functions, types, and interfaces for the module.
Package types implements the functions, types, and interfaces for the module.
Package types implements the functions, types, and interfaces for the module.
Package types implements the functions, types, and interfaces for the module.
Package types implements the functions, types, and interfaces for the module.
Package types implements the functions, types, and interfaces for the module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ZeroOr ¶
func ZeroOr[T comparable](v T, def T) T
ZeroOr returns def if v is the zero value. Decrypted: use cmp.ZeroOr instead.
Types ¶
type Boolean ¶
Boolean is an interface that represents a boolean type. It is implemented by the built-in bool type.
type Complex ¶
type Complex = interface { Object constraints.Complex }
Complex is an interface that represents a complex64 or complex128 number.
type Const ¶
Const is an interface that represents a value that is either a Number, a Boolean, or a string. It is used to define constants in Go.
type Float ¶
type Float = interface { Object constraints.Float }
Float is an interface that represents a float32 or float64.
type Integer ¶
type Integer = interface { Object constraints.Integer }
Integer is an interface that represents an integer type.
type Map ¶ added in v0.2.5
type Map[K comparable, V any] interface { Object ~map[K]V }
type Number ¶
Number is an interface that represents any number type. It includes all the interfaces defined above.
type Ordered ¶
type Ordered = interface { Object constraints.Ordered }
Ordered is an interface that represents any ordered type.
type Signed ¶
type Signed = interface { Object constraints.Signed }
Signed is an interface that represents a signed integer type.
type String ¶
String is an interface that represents a string-like type. It can be a string, a byte slice, or a rune slice.
type Unsigned ¶
type Unsigned = interface { Object constraints.Unsigned }
Unsigned is an interface that represents an unsigned integer type.