Skip to content

Commit

Permalink
go/build: document characters allowed in build tags
Browse files Browse the repository at this point in the history
The documentation just said "alphanumeric", but underscores and dots
are also accepted.

Fixes #32886

Change-Id: I1ba872a220d5c5bf64f1d851ddba9eb3b1afb89a
Reviewed-on: https://go-review.googlesource.com/c/go/+/184917
Reviewed-by: Bryan C. Mills <[email protected]>
  • Loading branch information
Jay Conrod committed Jul 3, 2019
1 parent 1c1e517 commit b412fde
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/go/build/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@
// To distinguish build constraints from package documentation, a series of
// build constraints must be followed by a blank line.
//
// A build constraint is evaluated as the OR of space-separated options;
// each option evaluates as the AND of its comma-separated terms;
// and each term is an alphanumeric word or, preceded by !, its negation.
// That is, the build constraint:
// A build constraint is evaluated as the OR of space-separated options.
// Each option evaluates as the AND of its comma-separated terms.
// Each term consists of letters, digits, underscores, and dots.
// A term may be negated with a preceding !.
// For example, the build constraint:
//
// // +build linux,386 darwin,!cgo
//
Expand Down

0 comments on commit b412fde

Please sign in to comment.