reflect: add pointerTo()

This commit is contained in:
Damian Gryski
2023-02-28 09:07:26 -08:00
committed by Damian Gryski
parent ca823f9a0d
commit 3a3de8a778
2 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1017,7 +1017,7 @@ func Zero(typ Type) Value {
// new value of the given type.
func New(typ Type) Value {
return Value{
typecode: PtrTo(typ).(*rawType),
typecode: pointerTo(typ.(*rawType)),
value: alloc(typ.Size(), nil),
flags: valueFlagExported,
}