My complain with nil in Go is that there are different kinds of it as a nil pointer to a struct is not equal to a nil pointer of the interface it implements and code like <a href="https:&#x2F;&#x2F;play.golang.org&#x2F;p&#x2F;NwKvIztXwP" rel="nofollow">https:&#x2F;&#x2F;play.golang.org&#x2F;p&#x2F;NwKvIztXwP</a> prints false.<p>This is the reason for the rule of always returning error type in Go, not a pointer to detailed struct error. That leads to an ugly code when a check for non-nil err is followed by a cast.