package
0.1.0
Repository: https://github.com/invicton-labs/go-common.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CopyMap creates a copy of the input map.
CopySlice will create a copy of the given slice.
FilterSlice creates a new slice of elements that meet a given condition function.
Flatten2D flattens a 2-dimensional slice of type T into a 1-dimensional slice of type T.
Flatten3D flattens a 3-dimensional slice of type T into a 1-dimensional slice of type T.
No description provided by the author
No description provided by the author
IntersectionUnique returns the set of unique values (no duplicates) that are present in each of the given slices.
MapAscending will return a closure (iterator) that will return the next element of the map (in ascending order by key) each time it's called.
MapDescending will return a closure (iterator) that will return the next element of the map (in descending order by key) each time it's called.
MapKeys gets all keys of the input map as a slice.
MapValues gets all values of the input map as a slice.
MapValuesByAscendingKey gets all values of the input map as a slice, sorted in ascending order of the map's keys.
MapValuesByDescendingKey gets all values of the input map as a slice, sorted in descending order of the map's keys.
MergeMaps will merge multiple maps together, with values for keys in later maps overwriting values with the same keys in previous maps.
No description provided by the author
No description provided by the author
New returns an initialized list.
Range creates a slice of integer values from `start` (inclusive) to `end` (exclusive).
Repeat creates a slice that repeats the given value a certain number of times.
No description provided by the author
RepeatZero creates a slice of a certain number of copies of the zero value of the given type.
No description provided by the author
No description provided by the author
SliceConversion will convert a slice from one simple numeric type to another.
SliceDiff will get a slice of all elements that are present in `a` but not in `b`.
SliceDiff will get a slice of all unique elements that are present in `a` but not in `b`.
SliceEqual checks whether two slices are equal by using a comparison function on each pair of elements.
SliceEqualWithErr checks whether two slices are equal by using a comparison function (which can return an error) on each pair of elements.
No description provided by the author
No description provided by the author
SliceUnique will get a new slice containing all unique/distinct values in the input slice, in the order that they appear.
SortSliceAscendingCopy will return a sorted (in ascending order) copy of the given slice, leaving elements with equal values where they are (stable sort).
SortSliceAscendingInPlace will sort the given slice in ascending order, leaving elements with equal values where they are (stable sort).
SortSliceDescendingCopy will return a sorted (in descending order) copy of the given slice, leaving elements with equal values where they are (stable sort).
SortSliceDescendingInPlace will sort the given slice in descending order, leaving elements with equal values where they are (stable sort).
TransformMap maps an input map to an output map using a transformation function.
TransformMapToSlice transforms map into a slice using the given transformation function.
TransformMapWithErr maps an input map to an output map using a transformation function that can return an error.
TransformSlice maps an input slice to an output slice using a transformation function.
TransformSliceToHashMap transforms a slice of elements to a hash (lookup) map using a given transformation function.
TransformSliceToHashMapWithErr transforms a slice of elements to a hash (lookup) map using a given transformation function, and allows the transformation function to return an error that will cancel the execution.
TransformSliceToMap transforms a slice of elements to a map of elements using a given transformation function.
TransformSliceToMapWithErr transforms a slice of elements to a map of elements using a given transformation function, and allows the transformation function to return an error that will cancel the execution.
TransformSliceWithErr maps an input slice to an output slice using a transformation function and allows returning an error.
UnionUnique returns the set of unique values (no duplicates) that are present in at least one of the given slices.

# Interfaces

HashMap is an interface that represents a keys-only map.
No description provided by the author
No description provided by the author