Agreed o the Enum part. It kind of sucks that if i expose a package level const (like a enum-ish thing) its not enforced by the compiler.
package options
const (
OK = iota
WARNING
FATAL
)
Later in the code import (
"package/options"
)
func main() {
ok := options.OK // iota value 1
useOption(ok) // OK
useOption(1) // ALSO OK
}
I should be able to enforce that only values from the exposed options can be used on a type level.