summaryrefslogtreecommitdiff
path: root/bindings/go/conftest.go
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
commit67c32a98315f785a9ec9d531c1f571a0196c7463 (patch)
tree4abb9cbeecc7901726dd0b4a37369596c852e9ef /bindings/go/conftest.go
parent9f61947910e6ab40de38e6b4034751ef1513200f (diff)
Diffstat (limited to 'bindings/go/conftest.go')
-rw-r--r--bindings/go/conftest.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/bindings/go/conftest.go b/bindings/go/conftest.go
new file mode 100644
index 0000000000000..d97fb89f7c2b6
--- /dev/null
+++ b/bindings/go/conftest.go
@@ -0,0 +1,16 @@
+package main
+
+import (
+ "go/build"
+ "os"
+)
+
+// Tests that the Go compiler is at least version 1.2.
+func main() {
+ for _, tag := range build.Default.ReleaseTags {
+ if tag == "go1.2" {
+ os.Exit(0)
+ }
+ }
+ os.Exit(1)
+}