Skip to content
This repository was archived by the owner on Jul 29, 2021. It is now read-only.

Commit 455be5b

Browse files
committed
Rebuild README.md
1 parent 17e2269 commit 455be5b

File tree

1 file changed

+55
-21
lines changed

1 file changed

+55
-21
lines changed

examples/build/README.md

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ During a particular build, the following words are satisfied:
104104
- "cgo", if ctxt.CgoEnabled is true
105105
- "go1.1", from Go version 1.1 onward
106106
- "go1.2", from Go version 1.2 onward
107+
- "go1.3", from Go version 1.3 onward
108+
- "go1.4", from Go version 1.4 onward
107109
- any additional words listed in ctxt.BuildTags
108110

109111
If a file's name, after stripping the extension and a possible _test suffix,
@@ -114,15 +116,10 @@ matches any of the following patterns:
114116
*_GOARCH
115117
*_GOOS_GOARCH
116118

117-
(example: source_windows_amd64.go) or the literals:
118-
119-
120-
GOOS
121-
GOARCH
122-
123-
(example: windows.go) where GOOS and GOARCH represent any known operating
124-
system and architecture values respectively, then the file is considered to
125-
have an implicit build constraint requiring those terms.
119+
(example: source_windows_amd64.go) where GOOS and GOARCH represent
120+
any known operating system and architecture values respectively, then
121+
the file is considered to have an implicit build constraint requiring
122+
those terms.
126123

127124
To keep a file from being considered for the build:
128125

@@ -147,6 +144,9 @@ Naming a file dns_windows.go will cause it to be included only when
147144
building the package for Windows; similarly, math_386.s will be included
148145
only when building the package for 32-bit x86.
149146

147+
Using GOOS=android matches build tags and files as for GOOS=linux
148+
in addition to android tags and files.
149+
150150

151151

152152

@@ -330,6 +330,12 @@ const (
330330
// If AllowBinary is set, Import can be satisfied by a compiled
331331
// package object without corresponding sources.
332332
AllowBinary
333+
334+
// If ImportComment is set, parse import comments on package statements.
335+
// Import returns an error if it finds a comment it cannot understand
336+
// or finds conflicting comments in multiple source files.
337+
// See golang.org/s/go14customimport for more information.
338+
ImportComment
333339
)
334340
```
335341

@@ -340,6 +346,33 @@ const (
340346

341347

342348

349+
## type MultiplePackageError
350+
``` go
351+
type MultiplePackageError struct {
352+
Dir string // directory containing files
353+
Packages []string // package names found
354+
Files []string // corresponding files: Files[i] declares package Packages[i]
355+
}
356+
```
357+
MultiplePackageError describes a directory containing
358+
multiple buildable Go source files for multiple packages.
359+
360+
361+
362+
363+
364+
365+
366+
367+
368+
369+
370+
### func (\*MultiplePackageError) Error
371+
``` go
372+
func (e *MultiplePackageError) Error() string
373+
```
374+
375+
343376
## type NoGoError
344377
``` go
345378
type NoGoError struct {
@@ -369,18 +402,19 @@ func (e *NoGoError) Error() string
369402
## type Package
370403
``` go
371404
type Package struct {
372-
Dir string // directory containing package sources
373-
Name string // package name
374-
Doc string // documentation synopsis
375-
ImportPath string // import path of package ("" if unknown)
376-
Root string // root of Go tree where this package lives
377-
SrcRoot string // package source root directory ("" if unknown)
378-
PkgRoot string // package install root directory ("" if unknown)
379-
BinDir string // command install directory ("" if unknown)
380-
Goroot bool // package found in Go root
381-
PkgObj string // installed .a file
382-
AllTags []string // tags that can influence file selection in this directory
383-
ConflictDir string // this directory shadows Dir in $GOPATH
405+
Dir string // directory containing package sources
406+
Name string // package name
407+
ImportComment string // path in import comment on package statement
408+
Doc string // documentation synopsis
409+
ImportPath string // import path of package ("" if unknown)
410+
Root string // root of Go tree where this package lives
411+
SrcRoot string // package source root directory ("" if unknown)
412+
PkgRoot string // package install root directory ("" if unknown)
413+
BinDir string // command install directory ("" if unknown)
414+
Goroot bool // package found in Go root
415+
PkgObj string // installed .a file
416+
AllTags []string // tags that can influence file selection in this directory
417+
ConflictDir string // this directory shadows Dir in $GOPATH
384418

385419
// Source files
386420
GoFiles []string // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles)

0 commit comments

Comments
 (0)