mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
internal/reflectlite, reflect: handle different StructField
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package reflect
|
||||
|
||||
import "internal/reflectlite"
|
||||
import (
|
||||
"internal/reflectlite"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func VisibleFields(t Type) []StructField {
|
||||
return reflectlite.VisibleFields(toRawType(t))
|
||||
fields := reflectlite.VisibleFields(toRawType(t))
|
||||
return *(*[]StructField)(unsafe.Pointer(&fields))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user