Discover Packages
github.com/enetx/g
cmp
package
Version:
v1.0.81
Opens a new window with list of versions in this module.
Published: May 31, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
Max returns the maximum value among the given values. The values must be of a type that implements
the cmp.Ordered interface for comparison.
MaxBy finds the maximum value in the collection t according to the provided comparison function fn.
It returns the maximum value found.
Min returns the minimum value among the given values. The values must be of a type that implements
the cmp.Ordered interface for comparison.
MinBy finds the minimum value in the collection t according to the provided comparison function fn.
It returns the minimum value found.
Ordering is the result of a comparison between two values.
Cmp compares two ordered values and returns the result as an Ordering value.
IsEq returns true if the Ordering value is Equal.
IsGt returns true if the Ordering value is Greater.
IsLt returns true if the Ordering value is Less.
Reverse reverses the ordering.
String returns the string representation of the Ordering value.
Then returns the receiver if it's equal to Equal, otherwise returns the receiver.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.