buildflags

package
v0.0.0-...-83f582a Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	A             bool
	N             bool
	P             int
	Race          bool
	Msan          bool
	V             bool
	Work          bool
	X             bool
	AsmFlags      stringsFlag
	BuildMode     string
	Compiler      string
	GCCGoFlags    stringsFlag
	GCFlags       stringsFlag
	InstallSuffix string
	LDFlags       stringsFlag
	LinkShared    bool
	PkgDir        string
	Tags          stringsFlag
	ToolExec      stringsFlag
	GenerateRun   string
	// contains filtered or unexported fields
}

Data are all the flags that are shared by the go build, clean, get, install, list, run and test commands

func (*Data) BuildArgs

func (f *Data) BuildArgs(pkg *build.Package, gitCommit *plumbing.Hash) []string

BuildArgs returns strings suitable for passing to the go command line

func (*Data) BuildContext

func (f *Data) BuildContext() *build.Context

BuildContext returns a build context based on environment variables GOARCH, GOOS, GOROOT, GOPATH, CGO_ENABLED and command line flags

func (*Data) BuildFlags

func (f *Data) BuildFlags(run bool) []cli.Flag

BuildFlags returns cli.Flags to use with cli.Command

func (*Data) RebuildAll

func (f *Data) RebuildAll() bool

type TestFlagsData

type TestFlagsData struct {
	Data

	C                bool
	Exec             stringsFlag
	I                bool
	O                string
	Bench            string
	BenchMem         bool
	BenchTime        time.Duration
	BlockProfile     string
	BlockProfileRate int
	Count            int
	Cover            bool
	CoverMode        string
	CoverPkg         string
	CoverProfile     string
	CPU              string
	CPUProfile       string
	MemProfile       string
	MemProfileRate   int
	OutputDir        string
	Parallel         int
	Run              string
	Short            bool
	Timeout          time.Duration
	Trace            string
	V                bool
}

func (*TestFlagsData) TestArgs

func (f *TestFlagsData) TestArgs(pkg *build.Package, gitCommit *plumbing.Hash) []string

func (*TestFlagsData) TestFlags

func (f *TestFlagsData) TestFlags() []cli.Flag

Jump to

Keyboard shortcuts

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