Documentation
¶
Overview ¶
Package gogo/build provides functions for building Go packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { project.Resolver project.Statistics Toolchain SearchPaths []string // contains filtered or unexported fields }
func NewContext ¶
NewContext returns a Context that can be used to build *Project using the specified goroot, goos, and goarch.
func NewDefaultContext ¶
NewDefaultContext returns a Context that represents the version of Go that compiled gogo.
func (*Context) Mkdir ¶
Mkdir creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. If path is already a directory, MkdirAll does nothing and returns nil.
type Future ¶
type Future interface { // Result returns the result of the work as an error, or nil if the work // was performed successfully. // Implementers must observe these invariants // 1. There may be multiple concurrent callers to Result, or Result may // be called many times in sequence, it must always return the same // 2. Result blocks until the work has been performed. Result() error }
A Future represents the result of a build operation.
func Build ¶
Build returns a Future representing the result of compiling the package pkg and its dependencies. If pkg is a command, then the results of build include linking the final binary into pkg.Context.Bindir().
type ObjFuture ¶
type ObjFuture interface { Future // Objfile returns the name of the file that is // produced by the Target if successful. Objfile() string }
ObjFuture represents a Future that produces an Object file.
func Asm ¶
Asm returns a Future representing the result of assembling sfile with the Context specified asssembler.
type PkgFuture ¶
type PkgFuture interface { Future // contains filtered or unexported methods }
PkgFuture represents a Future that produces a pkg (.a) file.
type Toolchain ¶
type Toolchain interface { Gc(importpath, srcdir, outfile string, files []string) error Asm(srcdir, ofile, sfile string) error Pack(string, ...string) error Ld(string, string) error Cc(srcdir, objdir, ofile, cfile string) error Cgo(string, []string) error Gcc(string, []string) error Libgcc() (string, error) // contains filtered or unexported methods }
Toolchain represents a standardised set of command line tools used to build and test Go programs.