Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
esafonov committed Dec 3, 2023
1 parent e84fd34 commit b13a71b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ptr/ptr.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func StrDef[T any](v *T, def string) string {
return fmt.Sprintf("%v", *v)
}

// Coalesce returns first not nil. If all elements are nil, nil will be returned.
// Coalesce returns the first not nil value. If all elements are nil, the nil will be returned.
func Coalesce[T any](pp ...*T) *T {
for _, p := range pp {
if p != nil {
Expand Down

0 comments on commit b13a71b

Please sign in to comment.