Last active
August 29, 2015 14:02
-
-
Save hami9x/6d9592f8f25613cf7889 to your computer and use it in GitHub Desktop.
reflect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
o = reflect.NewAt(reflect.TypeOf(jso.Interface()), unsafe.Pointer(jso.Unsafe())).Elem() | |
println(o.FieldByName(field).CanInterface()) //It returns true | |
println(o.FieldByName(field).Interface()) //Uncaught TypeError: Cannot read property 'constructor' of undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment