Skip to content

Commit 4b068ca

Browse files
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 <[email protected]> Reviewed-by: Russ Cox <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 376518d commit 4b068ca

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/go1.16.html

+19
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,25 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
762762
</dd>
763763
</dl><!-- go/build -->
764764

765+
<dl id="go/build/constraint"><dt><a href="/pkg/go/build/constraint/">go/build/constraint</a></dt>
766+
<dd>
767+
<p><!-- CL 240604 -->
768+
The new
769+
<a href="/pkg/go/build/constraint/"><code>go/build/constraint</code></a>
770+
package parses build constraint lines, both the original
771+
<code>// +build</code> syntax and the <code>//go:build</code>
772+
syntax that will be introduced in Go 1.17.
773+
This package exists so that tools built with Go 1.16 will be able
774+
to process Go 1.17 source code.
775+
See <a href="https://golang.org/design/draft-gobuild">https://golang.org/design/draft-gobuild</a>
776+
for details about the build constraint syntaxes and the planned
777+
transition to the <code>//go:build</code> syntax.
778+
Note that <code>//go:build</code> lines are <b>not</b> supported
779+
in Go 1.16 and should not be introduced into Go programs yet.
780+
</p>
781+
</dd>
782+
</dl><!-- go/build/constraint -->
783+
765784
<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
766785
<dd>
767786
<p><!-- CL 243938 -->

0 commit comments

Comments
 (0)