Moving PtrOf to package internal/ptr
This commit is contained in:
parent
99be328e9d
commit
c2703558d7
13 changed files with 148 additions and 136 deletions
6
internal/utils/ptr/ptr.go
Normal file
6
internal/utils/ptr/ptr.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package ptr
|
||||
|
||||
// Of returns the address of any given parameter
|
||||
func Of[T any](value T) *T {
|
||||
return &value
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue