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

> It totally makes sense from a Go perspective: You created a struct, tried (but failed) to populate it with some json data, and ended up with a value initialised to its zero-value. This is fine :)

To me it looks like a footgun: if the parsing failed then an error should have been signalled. In this case, there is no error and you silently get the wrong value.



Yeah, I presented that wrong. It's not actually a failure as such.




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

Search: