golang.org/toolchain@v0.0.1-go1.9rc2.windows-amd64/blog/content/constants/bool.go (about) 1 // +build OMIT 2 3 package main 4 5 import "fmt" 6 7 func main() { 8 // START OMIT 9 type MyBool bool 10 const True = true 11 const TypedTrue bool = true 12 var mb MyBool 13 mb = true // OK 14 mb = True // OK 15 mb = TypedTrue // Bad 16 fmt.Println(mb) 17 // STOP OMIT 18 }