Hacker News new | ask | show | jobs
by agonux 110 days ago
This is a classic pitfall. Every Go developer knows that using this assignment is discouraged, because interfaces are structures composed of two fields. You are assigning a pointer-type value to an interface. (_type = *bytes.Buffer, data = nil)

`out` is then no longer equal to `nil`.