Last active
December 28, 2017 20:06
-
-
Save jonbodner/bec2fcdf148a7663f87fd951636f4513 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
subv = v | |
destring = f.quoted | |
for _, i := range f.index { | |
if subv.Kind() == reflect.Ptr { | |
if subv.IsNil() { | |
subv.Set(reflect.New(subv.Type().Elem())) | |
} | |
subv = subv.Elem() | |
} | |
subv = subv.Field(i) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment