lo icon indicating copy to clipboard operation
lo copied to clipboard

πŸ’₯ A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

Results 291 lo issues
Sort by recently updated
recently updated
newest added

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...

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 could be a combination of HexLettersCharset = = []rune("ABCDEF") and `NumbersCharset`.