mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
go/build: prioritize build constraints in docs
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>
This commit is contained in:
parent
710476495a
commit
c72e274725
@ -4,6 +4,21 @@
|
|||||||
|
|
||||||
// Package build gathers information about Go packages.
|
// 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
|
// # Go Path
|
||||||
//
|
//
|
||||||
// The Go path is a list of directory trees containing Go source code.
|
// The Go path is a list of directory trees containing Go source code.
|
||||||
@ -55,21 +70,6 @@
|
|||||||
// foo/
|
// foo/
|
||||||
// bar.a (installed package object)
|
// 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
|
// # Binary-Only Packages
|
||||||
//
|
//
|
||||||
// In Go 1.12 and earlier, it was possible to distribute packages in binary
|
// In Go 1.12 and earlier, it was possible to distribute packages in binary
|
||||||
|
Loading…
x
Reference in New Issue
Block a user