Documentation ¶
Index ¶
- Constants
- func BuildAll(ctx context.Context, out, path string, flags []string, options ...exec.Option) error
- func BuildPath(ctx context.Context, output, binary, path string, flags []string, ...) error
- func BuildTarget(goos, goarch string) string
- func InstallAll(ctx context.Context, path string, flags []string, options ...exec.Option) error
- func Ldflags(flags ...string) string
- func ModTidy(ctx context.Context, path string, options ...exec.Option) error
- func ModVerify(ctx context.Context, path string, options ...exec.Option) error
- func Name() string
- func PackageLiteral(path, version string) string
- func ParseTarget(t string) (goos, goarch string, err error)
Constants ¶
View Source
const ( // CommandInstall represents go "install" command. CommandInstall = "install" // CommandBuild represents go "build" command. CommandBuild = "build" // CommandMod represents go "mod" command. CommandMod = "mod" // CommandModTidy represents go mod "tidy" command. CommandModTidy = "tidy" // CommandModVerify represents go mod "verify" command. CommandModVerify = "verify" )
View Source
const ( FlagMod = "-mod" FlagModValueReadOnly = "readonly" FlagLdflags = "-ldflags" FlagOut = "-o" )
View Source
const ( EnvGOOS = "GOOS" EnvGOARCH = "GOARCH" )
Variables ¶
This section is empty.
Functions ¶
func BuildPath ¶
func BuildPath(ctx context.Context, output, binary, path string, flags []string, options ...exec.Option) error
BuildPath runs go install on cmd folder with options.
func BuildTarget ¶
BuildTarget builds a GOOS:GOARCH pair.
func InstallAll ¶
InstallAll runs go install ./... on path with options.
func PackageLiteral ¶
PackageLiteral returns the string representation of package part of go get [package].
func ParseTarget ¶
ParseTarget parses GOOS:GOARCH pair.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.