{"@attributes":{"version":"2.0"},"channel":{"title":"Meir Blumenfeld","link":"https:\/\/meblum.dev\/","description":"Recent content on Meir Blumenfeld","generator":"Hugo -- gohugo.io","language":"en-us","lastBuildDate":"Tue, 14 Mar 2023 23:57:50 -0400","item":{"title":"Checking arguments for nil","link":"https:\/\/meblum.dev\/posts\/checking-arguments-for-nil\/","pubDate":"Tue, 14 Mar 2023 23:57:50 -0400","guid":"https:\/\/meblum.dev\/posts\/checking-arguments-for-nil\/","description":"In this post, we&rsquo;ll explore multiple ways to check a Go interface value for nil, and try to expain why you should probably not check them at all. Let&rsquo;s start with an example to introduce the problem.\nIn Go, when we assign a typed nil value to an interface, the interface will not be equal to nil. Consider the following, We define a Sender interface with two implementations, an EmailSender and SMSSender:"}}}