Putting anything that has a type in any interface makes it non nil.
(*foo)(nil) has a type.
On Fri, Dec 22, 2017, 17:38 Vincent Rischmann wrote:
> Hello,
>
> while refactoring some code I encountered something strange regarding
> redeclarations.
>
> Here is an example: https://play.golang.org/p/
Hello,
while refactoring some code I encountered something strange regarding
redeclarations.
Here is an example: https://play.golang.org/p/b7Bp2w2fWwk
Somehow after redeclaring err when calling doIt, err is apparently not nil,
yet the functions never return anything other than nil.
If I use a