From: Andrew Gerrand go run
" replaces "go run *.go
".
+The "go1.1
" tag has been added to the list of default
+build constraints.
+This permits packages to take advanage of the new features in Go 1.1 while
+remaining compatible with earlier versions of Go.
+
+To build a file only with Go 1.1 and above, add this build constraint: +
+ ++// +build go1.1 ++ +
+To build a file only with Go 1.0.x, use the converse constraint: +
+ ++// +build !go1.1 ++
diff --git a/src/pkg/go/build/doc.go b/src/pkg/go/build/doc.go index c562d05d00..4b66b84bb6 100644 --- a/src/pkg/go/build/doc.go +++ b/src/pkg/go/build/doc.go @@ -91,8 +91,9 @@ // // - the target operating system, as spelled by runtime.GOOS // - the target architecture, as spelled by runtime.GOARCH -// - the compiler being used, currently either "gc" or "gccgo" +// - the compiler being used, either "gc" or "gccgo" // - "cgo", if ctxt.CgoEnabled is true +// - "go1.1", from Go version 1.1 onward // - any additional words listed in ctxt.BuildTags // // If a file's name, after stripping the extension and a possible _test suffix,