Skip to content

Commit 48b826e

Browse files
committed
Fix documentation for op.Ref
1 parent ef32854 commit 48b826e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

it/op/op.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ func Add[V ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~int | ~int
55
return a + b
66
}
77

8-
// Ref returns a reference to the provided value.
8+
// Ref returns a reference to a copy of the provided value.
9+
//
10+
// This may be useful when interacting with packages that use pointers as
11+
// proxies for optional values.
912
func Ref[V any](v V) *V {
1013
return &v
1114
}

0 commit comments

Comments
 (0)