reflect: set PkgPath in StructField

This commit is contained in:
Damian Gryski
2023-03-08 10:09:17 -08:00
committed by Ayke
parent 93fb897feb
commit 1626b50457
+1 -4
View File
@@ -594,10 +594,7 @@ func rawStructFieldFromPointer(fieldType *rawType, data unsafe.Pointer, flagsByt
pkgPath := ""
if flagsByte&structFieldFlagIsExported == 0 {
// This field is unexported.
// TODO: list the real package path here. Storing it should not
// significantly impact binary size as there is only a limited
// number of packages in any program.
pkgPath = "<unimplemented>"
pkgPath = fieldType.PkgPath()
}
return rawStructField{