
Compile-time assertions in Go - akavel
https://www.reddit.com/r/golang/comments/5q9jza/compiletime_assertions_in_go/dcxtw5q/
======
akavel
Slightly tweaked to allow using len():

    
    
        type Hash [16]byte
        const _ = uint(len(Hash{}) - md5.Size)
    

[https://play.golang.org/p/qH6DkOcvSC](https://play.golang.org/p/qH6DkOcvSC)

