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.
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 ¶
type Boolean interface { ~bool }
Boolean is an interface that represents a boolean type. It is implemented by the built-in bool type.
type Complex ¶
type Complex = 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 = constraints.Float
Float is an interface that represents a float32 or float64.
type Integer ¶
type Integer = constraints.Integer
Integer is an interface that represents an integer type.
type Number ¶
Number is an interface that represents any number type. It includes all the interfaces defined above.
type Ordered ¶
type Ordered = constraints.Ordered
Ordered is an interface that represents any ordered type.
type Signed ¶
type Signed = 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 = constraints.Unsigned
Unsigned is an interface that represents an unsigned integer type.