1 package main 2 3 import ( 4 "go/build" 5 "os" 6 ) 7 8 // Tests that the Go compiler is at least version 1.2. 9 func main() { 10 for _, tag := range build.Default.ReleaseTags { 11 if tag == "go1.2" { 12 os.Exit(0) 13 } 14 } 15 os.Exit(1) 16 } 17