Golang shorts #4 — Reflect like a boss
Thanks for the changes in the gist file for Oliver Eilhard to make it more simple and straightforward.
So the main thing what happens here, the Result is an array of JSON content. The Each method gets a type what it can use to translate this JSONs and basically returns the slice of translated data.
I’m very happy to found this solution because many times I struggle with the same problem and I tried many other solutions, but it’s way more better than all of mine.