conftest.go 219 B

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