1
Fork 0
mirror of https://github.com/RGBCube/GoNew synced 2025-08-01 09:57:47 +00:00
This commit is contained in:
RGBCube 2023-04-10 22:31:32 +03:00
parent 1c77137a38
commit 9dc7cb7b36

1
new.go
View file

@ -1,5 +1,6 @@
package new package new
// New allocates the thing on the heap and returns a non-nil pointer to it.
func New[T any](thing T) *T { func New[T any](thing T) *T {
return &thing return &thing
} }