mirror of
https://github.com/samber/lo.git
synced 2026-04-22 15:37:14 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
552 B
552 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Keyify | keyify | slice.go#L429 | core | slice | https://go.dev/play/p/_d5lXdzfw32 |
|
|
270 |
|
Returns a set-like map where each unique element of the slice is a key.
set := lo.Keyify([]int{1, 1, 2, 3, 4})
// map[int]struct{}{1: {}, 2: {}, 3: {}, 4: {}}