docs: Fix description for LastOrEmpty and LastOr (#636)

This commit is contained in:
Emil Shakirov
2025-05-22 13:13:51 +02:00
committed by GitHub
parent 52ad90c405
commit f2cfb22748

View File

@@ -2846,7 +2846,7 @@ last, ok := lo.Last([]int{})
### LastOrEmpty
Returns the first element of a collection or zero value if empty.
Returns the last element of a collection or zero value if empty.
```go
last := lo.LastOrEmpty([]int{1, 2, 3})
@@ -2858,7 +2858,7 @@ last := lo.LastOrEmpty([]int{})
### LastOr
Returns the first element of a collection or the fallback value if empty.
Returns the last element of a collection or the fallback value if empty.
```go
last := lo.LastOr([]int{1, 2, 3}, 245)