Skip to content

Commit

Permalink
make use of proper grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
lubedacht committed Jan 22, 2024
1 parent 8d6c454 commit 4e30a8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/util/ptr/ptr.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ func To[T any](v T) *T {
return &v
}

// Deref dereferences attempts to dereference a pointer
// and returns the default value if the pointer is nil.
// Deref attempts to dereference a pointer and return the value.
// If the pointer is nil, the provided default value will be returned instead.
func Deref[T any](ptr *T, def T) T {
if ptr != nil {
return *ptr
Expand Down

0 comments on commit 4e30a8e

Please sign in to comment.