Go · Concepts
The Go Interface nil TrapWhy err != nil Is True
You return a nil pointer and err != nil comes out true, because an interface value has two slots: a type and the data. From that two-slot layout to method sets, where interfaces should live, and the cost of dynamic dispatch.