Documentation ¶
Overview ¶
Package build provides tools for building Go packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = os.NewError("package could not be found locally")
View Source
var Path []*Tree
Path is a validated list of Trees derived from $GOPATH at init.
Functions ¶
Types ¶
type Cmd ¶
type DirInfo ¶
type DirInfo struct { GoFiles []string // .go files in dir (excluding CgoFiles) CgoFiles []string // .go files that import "C" CFiles []string // .c files in dir SFiles []string // .s files in dir Imports []string // All packages imported by goFiles PkgName string // Name of package in dir }
func ScanDir ¶
ScanDir returns a structure with details about the Go content found in the given directory. The file lists exclude:
- files in package main (unless allowMain is true)
- files in package documentation
- files ending in _test.go
- files starting with _ or .
Only files that satisfy the goodOSArch function are included.
type Tree ¶
Tree describes a Go source tree, either $GOROOT or one from $GOPATH.
func FindTree ¶
FindTree takes an import or filesystem path and returns the tree where the package source should be and the package import path.
func (*Tree) HasPkg ¶
HasPkg returns whether the given package's object file can be found inside this Tree.
func (*Tree) HasSrc ¶
HasSrc returns whether the given package's source can be found inside this Tree.
Click to show internal directories.
Click to hide internal directories.