golang

package
v0.0.0-...-c4da75d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOpts

type BuildOpts struct {
	// ExtraArgs to `go build`.
	ExtraArgs []string
}

Optional arguments to Environ.Build.

type Environ

type Environ struct {
	build.Context
}

func Default

func Default() Environ

func (Environ) Build

func (c Environ) Build(pkg string, binaryPath string, opts BuildOpts) error

Build compiles `pkg`, writing the executable or object to `binaryPath`.

func (Environ) Env

func (c Environ) Env() []string

func (Environ) FindPackageByPath

func (c Environ) FindPackageByPath(path string) (string, error)

FindPackageByPath gives the full Go package name for the package in `path`.

This currently assumes that packages are named after the directory they are in.

func (Environ) FindPackageDir

func (c Environ) FindPackageDir(pkg string) (string, error)

FindPackageDir returns the full path to `pkg` according to the context's Gopaths.

func (Environ) ListDeps

func (c Environ) ListDeps(pkg string) (*ListPackage, error)

func (Environ) ListPackage

func (c Environ) ListPackage(pkg string) (*build.Package, error)

func (Environ) String

func (c Environ) String() string

type ListPackage

type ListPackage struct {
	Dir        string
	Deps       []string
	GoFiles    []string
	SFiles     []string
	HFiles     []string
	Goroot     bool
	Root       string
	ImportPath string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL