1
Fork 0
mirror of https://github.com/RGBCube/GoNew synced 2025-07-30 17:07:45 +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
// New allocates the thing on the heap and returns a non-nil pointer to it.
func New[T any](thing T) *T {
return &thing
}