diff options
Diffstat (limited to 'content/constants/bool.go')
-rw-r--r-- | content/constants/bool.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/content/constants/bool.go b/content/constants/bool.go new file mode 100644 index 0000000..7578d4a --- /dev/null +++ b/content/constants/bool.go @@ -0,0 +1,18 @@ +// +build OMIT + +package main + +import "fmt" + +func main() { + // START OMIT + type MyBool bool + const True = true + const TypedTrue bool = true + var mb MyBool + mb = true // OK + mb = True // OK + mb = TypedTrue // Bad + fmt.Println(mb) + // STOP OMIT +} |