HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Compile-time assertions in Go | Hacker News Reader
Compile-time assertions in Go
reddit.com
1 point
·
akavel
·
·
1 comment
Open article
Save
View on HN
akavel
(original poster)
·
Slightly tweaked to allow using len():
type Hash [16]byte const _ = uint(len(Hash{}) - md5.Size)
https://play.golang.org/p/qH6DkOcvSC
Reply on news.ycombinator.com