In golang nil is not always equal to nil
Even experienced go developers can get tripped up by this one edge case in golang. In golang nil is not always equal to nil. A variable that holds an interface can have a nil value but still pass a nil check. An interface value is internally stored as two words: Type word – the dynamic type of the value stored in the interface. Value word – the actual value itself (or a pointer to it)....