Skip to content

Commit

Permalink
Merge branch 'master' of github.com:samber/lo
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Apr 30, 2022
2 parents 2552cd5 + 50adc54 commit ca59c95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1248,15 +1248,15 @@ lo.Empty[bool]()
Returns the first non-empty arguments. Arguments must be comparable.

```go
result, ok := Coalesce(0, 1, 2, 3)
result, ok := lo.Coalesce(0, 1, 2, 3)
// 1 true

result, ok := Coalesce("")
result, ok := lo.Coalesce("")
// "" false

var nilStr *string
str := "foobar"
result, ok := Coalesce[*string](nil, nilStr, &str)
result, ok := lo.Coalesce[*string](nil, nilStr, &str)
// &"foobar" true
```

Expand Down

0 comments on commit ca59c95

Please sign in to comment.