Yes, Ayan, you are quite correct. There are a lot of comparisons to check 
if an error is nil. It has it's own FAQ entry: 
https://golang.org/doc/faq#nil_error

Sincerely, what I am after is an example of a situation where the solution 
proposed by Dave Cheney would create a problem, like "See here. In this 
situation the proposed change would break my code."

When comparing error to nil, Dave's change would work just fine. That FAQ 
entry would not be needed anymore.

On Friday, November 3, 2017 at 7:31:47 AM UTC-2, Ayan George wrote:
>
>
>
> On 11/03/2017 05:23 AM, oju...@gmail.com <javascript:> wrote: 
> > Could somebody please point me to any example of comparing an 
> > interface to nil, in production code? Thanks. 
> > 
>
> Does checking if a variable of type error is nil count? 
>
> -ayan 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to