A modern Go utility library which provides helpers (map, find, contains, filter, ...)
Fix unix format for short_if.go
.
Min*
, Max*
previously returned a nil pointer when the argument does not contain any items, it has been changed to have a typesafe signature and it panicsStringerJoin
which joins an array of elements which implement the String() string
function (thks @arnovanliere)Get
to allows zero values with the option WithAllowZero
(thks @roneli)FilterBool
, ContainsBool
, InBools
, IndexOfBool
, LastIndexOfBool
, UniqBool
, DropBool
, ShuffleBool
, ReverseBools
(thks @arnovanliere)Zip
to panic when the passing argument is not a slice / arrayReduce
now returns an interfaceFlapMap
which manipulates an iteratee (map, slice) and transforms it to to a flattened collection of another typemap
when using Get
Set
which sets value at a path of a structDifferenceInt64
, DifferenceInt32
, DifferenceInt
, DifferenceUInt
, DifferenceUInt32
, DifferenceUInt64
Flatten
which flattens a two-dimensional array.Prune
which returns a copy of "in" that only contains fields in "paths"Thank you @youyuanwu @vellotis @guyarb @nohponex @CengSin @samber @HarryWang29
Join
which combines two collections using the given join method (thks @xunleii)Without
which creates an array excluding all given values (thks @xunleii)Subset
which returns true if a collection is a subset of another (thks @reetuparna)InnerJoin
, OuterJoin
, LeftJoin
, RightJoin
) and typesafe implementations (thks @xunleii)Uniq
, it returns a copy of the input without the duplicateSubtractString
when an empty array is passed (thks @alongat)Intersect
returns the intersection between two collections (thks @samber)Difference
returns the difference between two collections (thks @samber)GetOrElse
retrieves the value of the point or default (thks @samber)Subtract
the subtraction between two collections. It preserves order (thks @airani)lastIndexOf
(thks @kkty)Max*
methods (thks @abshek)Min*
methods (thks @CatInCosmicSpace)Chunk
FindKey
to iterate over elements of collection, returning the firstSome
to return true if at least one element is present in an iterateeIntersect
, IntersectString
(thks @novln)Compact
(thks @poporul)Reduce
which reduces an iterable based on a function (thks @poporul)Zip
which zip two iterables (thks @HaraldNordgren)Fill
which fills an iterable with a value (thks @HaraldNordgren)Every
which returns true if every element is present in a iteratee (thks @HaraldNordgren)Any
which returns true if any element of the iterable is not empty. If the iterable is empty, return False.All
which returns true if all elements of the iterable are not empty (or if the iterable is empty)ConvertSlice
which converts a slice to a desired typeDrop
which creates an array/slice with n
elements dropped from the beginning (thks @spoonscen)Compact
and Reduce
(thks @alexander-yu)Uniq
functions (thks @orvice)