Skip to content

Commit df28bdd

Browse files
authored
Fix documentation for Duration3 (#502)
Duration3 needs 4 assignments to call. To match`TryOf` documentation, `str, nbr, err, duration` names are used for the assignments.
1 parent 6ade78c commit df28bdd

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
@@ -1650,7 +1650,7 @@ err, duration := lo.Duration1(func() error {
16501650
// an error
16511651
// 3s
16521652

1653-
err, duration := lo.Duration3(func() (string, int, error) {
1653+
str, nbr, err, duration := lo.Duration3(func() (string, int, error) {
16541654
// very long job
16551655
return "hello", 42, nil
16561656
})

0 commit comments

Comments
 (0)