02-08-2017, 02:15 PM
This is just a short tutorial about using anonymous structs in Go, which can be very handy when dealing with JSON server responses (especially from Facebook).
So say you have this JSON response from the server:
and you want to put `lights` into a Go struct that looks like this:
with anonymous structs you can now do this with ease!
Good luck with your Go coding!
So say you have this JSON response from the server:
Hidden Content
and you want to put `lights` into a Go struct that looks like this:
Hidden Content
with anonymous structs you can now do this with ease!
Hidden Content
[To see links please register here]
is a link to a Go playground where I implemented this example.Good luck with your Go coding!