function comment update

This commit is contained in:
0syntrax0 2024-10-24 23:25:39 -05:00
parent 1e26bbee7a
commit 004faee9a6

View file

@ -3,9 +3,18 @@ package underscore
// Convert values to pointers // Convert values to pointers
// //
// Instead of: // Instead of:
// v = "value" // v := "value"
// MyPointerVar = &v // MyPointerVar = &v
// //
// Or
// v1 := "value1"
// v2 := 100
//
// obj := Obj{
// Field1: &v,
// Field2: &v2,
// }
//
// Use: // Use:
// MyPointerVar = ToPointer("value") // MyPointerVar = ToPointer("value")
func ToPointer[T any](in T) *T { func ToPointer[T any](in T) *T {