Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
78c4d50d
Commit
78c4d50d
authored
Apr 08, 2013
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: document go1.1 build tag
Fixes #5235. R=golang-dev, r CC=golang-dev
https://golang.org/cl/8426048
parent
b6bfc92d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
go1.1.html
doc/go1.1.html
+25
-0
doc.go
src/pkg/go/build/doc.go
+2
-1
No files found.
doc/go1.1.html
View file @
78c4d50d
...
...
@@ -403,6 +403,31 @@ command now returns an error if test files are provided on the command line. In
this sense, "
<code>
go run
</code>
" replaces "
<code>
go run *.go
</code>
".
</p>
<h3
id=
"tags"
>
Build constraints
</h3>
<p>
The
<code>
"go1.1
</code>
" tag has been added to the list of default
<a
href=
"/pkg/go/build/#hdr-Build_Constraints"
>
build constraints
</a>
.
This permits packages to take advanage of the new features in Go 1.1 while
remaining compatible with earlier versions of Go.
</p>
<p>
To build a file only with Go 1.1 and above, add this build constraint:
</p>
<pre>
// +build go1.1
</pre>
<p>
To build a file only with Go 1.0.x, use the converse constraint:
</p>
<pre>
// +build !go1.1
</pre>
<h3
id=
"platforms"
>
Additional platforms
</h3>
<p>
...
...
src/pkg/go/build/doc.go
View file @
78c4d50d
...
...
@@ -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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment