mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
doc/go1.16: document go/build/constraint package
For #40700 For #41184 Fixes #43957 Change-Id: Ia346f4cf160431b721efeba7dc5f1fb8814efd95 Reviewed-on: https://go-review.googlesource.com/c/go/+/287472 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
376518d77f
commit
4b068cafb5
1 changed files with 19 additions and 0 deletions
|
|
@ -762,6 +762,25 @@ func TestFoo(t *testing.T) {
|
|||
</dd>
|
||||
</dl><!-- go/build -->
|
||||
|
||||
<dl id="go/build/constraint"><dt><a href="/pkg/go/build/constraint/">go/build/constraint</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 240604 -->
|
||||
The new
|
||||
<a href="/pkg/go/build/constraint/"><code>go/build/constraint</code></a>
|
||||
package parses build constraint lines, both the original
|
||||
<code>// +build</code> syntax and the <code>//go:build</code>
|
||||
syntax that will be introduced in Go 1.17.
|
||||
This package exists so that tools built with Go 1.16 will be able
|
||||
to process Go 1.17 source code.
|
||||
See <a href="https://golang.org/design/draft-gobuild">https://golang.org/design/draft-gobuild</a>
|
||||
for details about the build constraint syntaxes and the planned
|
||||
transition to the <code>//go:build</code> syntax.
|
||||
Note that <code>//go:build</code> lines are <b>not</b> supported
|
||||
in Go 1.16 and should not be introduced into Go programs yet.
|
||||
</p>
|
||||
</dd>
|
||||
</dl><!-- go/build/constraint -->
|
||||
|
||||
<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 243938 -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue