Created
December 28, 2017 20:03
-
-
Save jonbodner/4c865b4a5f46697668fc349537c4a503 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Decoding into nil interface? Switch to non-reflect code. | |
if v.Kind() == reflect.Interface && v.NumMethod() == 0 { | |
v.Set(reflect.ValueOf(d.objectInterface())) | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment