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
31 lines
552 B
Markdown
31 lines
552 B
Markdown
---
|
|
name: Min
|
|
slug: min
|
|
sourceRef: find.go#L265
|
|
category: core
|
|
subCategory: find
|
|
playUrl: https://go.dev/play/p/fJFLwpY8eMN
|
|
variantHelpers:
|
|
- core#find#min
|
|
similarHelpers:
|
|
- core#find#minby
|
|
- core#find#minindex
|
|
- core#find#minindexby
|
|
- core#find#max
|
|
- core#find#maxby
|
|
- core#find#maxindex
|
|
- core#find#maxindexby
|
|
position: 140
|
|
signatures:
|
|
- "func Min[T constraints.Ordered](collection []T) T"
|
|
---
|
|
|
|
Returns the minimum value of a collection. Returns the zero value when the collection is empty.
|
|
|
|
```go
|
|
lo.Min([]int{1, 2, 3})
|
|
// 1
|
|
```
|
|
|
|
|