package
Version:
v0.0.18
Opens a new window with list of versions in this module.
Published: Feb 14, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 4
Opens a new window with list of known importers.
Documentation
¶
Abs returns the absolute value of v.
Contains returns true if vs contains v.
FromString parses s and returns a int.
Int dereferences and returns int. The int default value is returned if v is nil.
func IntOrDefault(v *int, defaultVal int) *int
IntOrDefault returns int if it is not nil, and a pointer to defaultVal otherwise.
Max returns the maximum value from v and vs.
Min returns the minimum value from v and vs.
Pointer returns a pointer to the given int.
Random returns a non-negative pseudo-random number of type int
RandomN returns a non-negative pseudo-random number in [0,n) of type int. It panics if n <= 0.
Sort sorts data in place. Not guaranteed to be stable.
Unique returns a new list containing unique ints from the given input
type Set map[int]struct{}
MakeSet returns a lookup map for int
ToSet returns a lookup map for int.
Contains returns true if Set contains v.
Intersect returns the intersection of two Sets.
Union returns the union of two Sets.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.