mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
690 B
690 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MinIndex | minindex | find.go#L287 | core | find | https://go.dev/play/p/RxAidik4p50 |
|
|
150 |
|
Returns the minimum value and its index. Returns (zero value, -1) when the collection is empty.
value, idx := lo.MinIndex([]int{2, 5, 3})
// value == 2, idx == 0