]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: prioritize build constraints in docs
authorSean Liao <sean@liao.dev>
Fri, 21 Mar 2025 23:06:54 +0000 (23:06 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 24 Mar 2025 17:22:30 +0000 (10:22 -0700)
Now that modules is the primary way of building go code,
GOPATH shouldn't be the first topic.

Change-Id: Icaf6c651bdcfbe69068c5980845f8eb5e40ead99
Reviewed-on: https://go-review.googlesource.com/c/go/+/660135
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/go/build/doc.go

index da11e49f637a97976a11f8ac3c33aa37a726be54..573631de6a725a98aa9de469bf29420a8d3e7f3b 100644 (file)
@@ -4,6 +4,21 @@
 
 // Package build gathers information about Go packages.
 //
+// # Build Constraints
+//
+// A build constraint, also known as a build tag, is a condition under which a
+// file should be included in the package. Build constraints are given by a
+// line comment that begins
+//
+//     //go:build
+//
+// Build constraints may also be part of a file's name
+// (for example, source_windows.go will only be included if the target
+// operating system is windows).
+//
+// See 'go help buildconstraint'
+// (https://pkg.go.dev/cmd/go#hdr-Build_constraints) for details.
+//
 // # Go Path
 //
 // The Go path is a list of directory trees containing Go source code.
 //                 foo/
 //                     bar.a          (installed package object)
 //
-// # Build Constraints
-//
-// A build constraint, also known as a build tag, is a condition under which a
-// file should be included in the package. Build constraints are given by a
-// line comment that begins
-//
-//     //go:build
-//
-// Build constraints may also be part of a file's name
-// (for example, source_windows.go will only be included if the target
-// operating system is windows).
-//
-// See 'go help buildconstraint'
-// (https://golang.org/cmd/go/#hdr-Build_constraints) for details.
-//
 // # Binary-Only Packages
 //
 // In Go 1.12 and earlier, it was possible to distribute packages in binary