Skip to content

Commit 3a534ad

Browse files
ghosxsamber
andauthored
Fixed the error in the usage example of lo.Latest in readme.md (#627)
* Update README.md Fixed the error in the usage example of lo.Latest in readme.md use []time.Time{…} (value of type []time.Time) as time.Time value in argument to lo.Latest * Update README.md --------- Co-authored-by: Samuel Berthe <[email protected]>
1 parent e62450f commit 3a534ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2773,7 +2773,7 @@ Search the maximum time.Time of a collection.
27732773
Returns zero value when the collection is empty.
27742774

27752775
```go
2776-
latest := lo.Latest([]time.Time{time.Now(), time.Time{}})
2776+
latest := lo.Latest(time.Now(), time.Time{})
27772777
// 2023-04-01 01:02:03 +0000 UTC
27782778
```
27792779

0 commit comments

Comments
 (0)