|
Tony Finch wrote:
Thanks. That is a much better demonstration than the one in the documentation I read.You can declare the type of a (set of) constant(s) making it safe since there's no implicit conversion (even if the type is just an alias). See for example the ByteSize enum defined at http://golang.org/doc/effective_go.html#constants
Stephen