Learning to Reflect

This talk was given at the London Gophers (Go London User Group) meetup at the Monzo offices

The reflect package in Go is super powerful. This talk goes into the basics you need to know so you don’t shoot yourself in the foot. We go through the laws of reflection and introduce reflect.Type and reflect.Value and how you can use them to unmarshal a map[string]interface into a usable struct.

When you use Reflection, all the help given by the Go compiler goes out the window. Make sure you have good automated tests!

You can find the slides and code examples on GitHub


Other talks i've given that you may enjoy

See all talks →