Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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`.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: