Reflect utilities for Go data types.
field, dataType, value, err := mirror.GetField(movie, "Title")
field, dataType, value, err := mirror.GetField(movie, "Director.Name")
field, dataType, value, err := mirror.GetField(movie, "Actors[0].Name")
Using simple queries:
field, dataType, value, err := mirror.GetField(movie, `Actors[Name="Tom Cruise"].Name`)
You can not use the .
character in query strings yet. This is a bug that needs to be fixed sometime.
Please take a look at the style guidelines if you'd like to make a pull request.
Cedric Fung | Scott Rayapoullé | Eduard Urbach |
Want to see your own name here?