go-funk is a modern Go library based on reflect.
| Name | Function |
| ----- | ----- |
| funk.Contains | Returns true if an element is present in a iteratee (slice, map, string). |
| funk.Intersect | Returns the intersection between two collections. |
| funk.Difference | Returns the difference between two collections.|
| funk.IndexOf | Gets the index at which the first occurrence of a value is found in an array or return -1 if the value cannot be found.|
| funk.LastIndexOf | Gets the index at which the last occurrence of a value is found in an array or return -1 if the value cannot be found.|
| funk.ToMap | Transforms a slice of structs to a map based on a pivot field.|
| funk.Filter | Filters a slice based on a predicate.|
| funk.Find | Finds an element in a slice based on a predicate.|
| funk.Map | Manipulates an iteratee (map, slice) and transforms it to another type:|
| funk.Get | Retrieves the value at path of struct(s).
| funk.GetOrElse | Retrieves the value of the pointer or default.|
| funk.Set | Set value at a path of a struct. |
| funk.MustSet | Short hand for funk.Set if struct does not contain interface{} field type to discard errors.|
| funk.Prune | Copy a struct with only selected fields. Slice is handled by pruning all elements.|
| funk.PruneByTag | Same functionality as funk.Prune, but uses struct tags instead of struct field names.|
| funk.Keys | Creates an array of the own enumerable map keys or struct field names.|
| funk.Values | Creates an array of the own enumerable map values or struct field values.|
| funk.ForEach | Range over an iteratee (map, slice).|
| funk.ForEachRight | Range over an iteratee (map, slice) from the right.|
| funk.Chunk | Creates an array of elements split into groups with the length of the size. If array can't be split evenly, the final chunk will be the remaining element.|
| funk.FlattenDeep | Recursively flattens an array.|
| funk.Uniq | Creates an array with unique values.|
| funk.Drop | Creates an array/slice with n elements dropped from the beginning.|
| funk.Initial | Gets all but the last element of array.|
| funk.Tail | Gets all but the first element of array.|
| funk.Shuffle | Creates an array of shuffled values.|
| funk.Subtract | Returns the subtraction between two collections. It preserve order.|
| funk.Sum | Computes the sum of the values in an array.|
| funk.Reverse | Transforms an array such that the first element will become the last, the second element will become the second to last, etc.|
| funk.SliceOf | Returns a slice based on an element.|
| funk.RandomInt | Generates a random int, based on a min and max values.|
| funk.RandomString | Generates a random string with a fixed length.|
| funk.Shard | Generates a sharded string with a fixed length and depth.|
| funk.Subset | Returns true if a collection is a subset of another|