aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-01-27 13:54:10 -0800
committerIan Lance Taylor <iant@golang.org>2021-01-28 05:46:54 +0000
commit4b068cafb5a5e094dd0b7ed37ff73e08309a39e7 (patch)
treee625d7289c67433f163c924719ee603eaeb2512e
parent376518d77fb5d718f90c8b66ea25660aa3734032 (diff)
downloadgo-4b068cafb5a5e094dd0b7ed37ff73e08309a39e7.tar.gz
go-4b068cafb5a5e094dd0b7ed37ff73e08309a39e7.zip
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>
-rw-r--r--doc/go1.16.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/go1.16.html b/doc/go1.16.html
index 3a45940479d..6cc75b48654 100644
--- a/doc/go1.16.html
+++ b/doc/go1.16.html
@@ -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 -->