Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(930)

Side by Side Diff: src/pkg/go/build/doc.go

Issue 7206049: code review 7206049: go/build: document blank line required after build cons... (Closed)
Patch Set: diff -r 45a405b5c63a https://code.google.com/p/go Created 12 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Package build gathers information about Go packages. 5 // Package build gathers information about Go packages.
6 // 6 //
7 // Go Path 7 // Go Path
8 // 8 //
9 // The Go path is a list of directory trees containing Go source code. 9 // The Go path is a list of directory trees containing Go source code.
10 // It is consulted to resolve imports that cannot be found in the standard 10 // It is consulted to resolve imports that cannot be found in the standard
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // bar.a (installed package object) 56 // bar.a (installed package object)
57 // 57 //
58 // Build Constraints 58 // Build Constraints
59 // 59 //
60 // A build constraint is a line comment beginning with the directive +build 60 // A build constraint is a line comment beginning with the directive +build
61 // that lists the conditions under which a file should be included in the packag e. 61 // that lists the conditions under which a file should be included in the packag e.
62 // Constraints may appear in any kind of source file (not just Go), but 62 // Constraints may appear in any kind of source file (not just Go), but
63 // they must appear near the top of the file, preceded 63 // they must appear near the top of the file, preceded
64 // only by blank lines and other line comments. 64 // only by blank lines and other line comments.
65 // 65 //
66 // To distinguish build constraints from package documentation, a blank line
adg 2013/01/24 02:19:48 ... a series of build constraints must be followed
rick 2013/01/24 02:24:04 Done.
67 // must follow the final build constraint.
68 //
66 // A build constraint is evaluated as the OR of space-separated options; 69 // A build constraint is evaluated as the OR of space-separated options;
67 // each option evaluates as the AND of its comma-separated terms; 70 // each option evaluates as the AND of its comma-separated terms;
68 // and each term is an alphanumeric word or, preceded by !, its negation. 71 // and each term is an alphanumeric word or, preceded by !, its negation.
69 // That is, the build constraint: 72 // That is, the build constraint:
70 // 73 //
71 // // +build linux,386 darwin,!cgo 74 // // +build linux,386 darwin,!cgo
72 // 75 //
73 // corresponds to the boolean formula: 76 // corresponds to the boolean formula:
74 // 77 //
75 // (linux AND 386) OR (darwin AND (NOT cgo)) 78 // (linux AND 386) OR (darwin AND (NOT cgo))
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // default functionality for other systems, which in this case would 114 // default functionality for other systems, which in this case would
112 // carry the constraint: 115 // carry the constraint:
113 // 116 //
114 // // +build !linux,!darwin !cgo 117 // // +build !linux,!darwin !cgo
115 // 118 //
116 // Naming a file dns_windows.go will cause it to be included only when 119 // Naming a file dns_windows.go will cause it to be included only when
117 // building the package for Windows; similarly, math_386.s will be included 120 // building the package for Windows; similarly, math_386.s will be included
118 // only when building the package for 32-bit x86. 121 // only when building the package for 32-bit x86.
119 // 122 //
120 package build 123 package build
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b