lo
lo copied to clipboard
π₯ A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)
Hi! I found this package very useful, I wish I find it early. But I have one small proposal: it may be useful also having one func near `lo.Map` which...
Solves #82
It supports merging multiple maps using custom merge logic, where the value type of the left and right maps can differ.
MergeSlice merges multiple slices without removing duplicates or shuffling the elements ```go result1 := lo.MergeSlice[int]([]int{1, 4, 7}, []int{2, 5, 8}, []int{3, 6, 9}) result2 := lo.MergeSlice[int]([]int{1}, []int{2, 5, 8}, []int{3,...
``` package main import ( "fmt" "github.com/samber/lo" ) type intSlice []int func main() { s1 := intSlice{3, 4, 5} s2 := lo.Filter(s1, func(_ int, _ int) bool { return true...
How to check if map key exists? Is there something like: lo.KeyExixst()
This fixes issue #364.
This could be a combination of HexLettersCharset = = []rune("ABCDEF") and `NumbersCharset`.
Close #361