check this documentation. https://golang.org/doc/faq#nil_error
6 Eylül 2018 Perşembe 22:15:17 UTC+3 tarihinde Burak Serdar yazdı: > > https://play.golang.org/p/KLXvFNCewyW > > Here, f2() never returns nil, because the returned "nil" valued > interface is of type *int. > > It would be really nice if vet could warn if a function returns an > interface, and there exist a code path in that function where the > return value is set from a reference. > > I've seen a lot of discussions about not returning interfaces, but > sometimes you just have to do it. > -- 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.