mirror of
https://github.com/RGBCube/GoNew
synced 2025-07-30 17:07:45 +00:00
Docs
This commit is contained in:
parent
1c77137a38
commit
9dc7cb7b36
1 changed files with 1 additions and 0 deletions
1
new.go
1
new.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue