11 lines
123 B
Go
11 lines
123 B
Go
package gentools
|
|
|
|
func Ptr[T any](t T) *T {
|
|
return &t
|
|
}
|
|
|
|
func ShallowCopy[T any](t *T) *T {
|
|
tCopy := *t
|
|
return &tCopy
|
|
}
|