AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
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