Hacker News new | ask | show | jobs
by BreakfastB0b 857 days ago
Because go doesn’t have exhaustiveness checking when initialising structs. Instead it encourages “make the zero value meaningful” which is not always possible nor desirable. I usually use a linter to catch this kind of problem https://github.com/GaijinEntertainment/go-exhaustruct
1 comments

I like this but in the examples would volume be calculated by width/length rather than being set?