2min chapter

Go Time: Golang, Software Engineering cover image

Reflection and meta programming

Go Time: Golang, Software Engineering

CHAPTER

The Importance of Testing for Edge Cases

Matt: One of the first issues I had with Reflect was that when somebody passes something in, you're like, okay, I'm going to get the value of this. But then somebody passes in like a nil pointer that has a type, but it's a nil pointer. And all of a sudden your code breaks and you are like, what just happened? You end up with these weird cases where if the type kind is a pointer and if it's nil, then you need to like use reflect dot new to instantiate a new elements. Like there's all these weird cases that you get to where it seems really simple. Matt: At the very end of it, you're still

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode