Skip to content

Commit

Permalink
Fix documentation for Duration3 (#502)
Browse files Browse the repository at this point in the history
Duration3 needs 4 assignments to call.

To match`TryOf` documentation,  `str, nbr, err, duration` names are used for the assignments.
  • Loading branch information
gecko655 authored Jul 21, 2024
1 parent 6ade78c commit df28bdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ err, duration := lo.Duration1(func() error {
// an error
// 3s

err, duration := lo.Duration3(func() (string, int, error) {
str, nbr, err, duration := lo.Duration3(func() (string, int, error) {
// very long job
return "hello", 42, nil
})
Expand Down

0 comments on commit df28bdd

Please sign in to comment.