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
573 B
573 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| First | first | find.go#L554 | core | find | https://go.dev/play/p/94lu5X6_cbf |
|
|
260 |
|
Returns the first element of a collection and whether it exists.
v, ok := lo.First([]int{1, 2, 3})
// v == 1, ok == true