modulepackage
0.0.15
Repository: https://github.com/charlievieth/buildutil.git
Documentation: pkg.go.dev
# Functions
BuildTags adds and build tags found in name or content to allTags.
GoCommand returns an exec.Cmd for the provided build.Context.
GoCommandContext returns an exec.Cmd for the provided build.Context and context.Context.
GoodOSArchFile returns false if the name contains a $GOOS or $GOARCH suffix which does not match the build Context.
return ctxt.Import(".", dir, mode).
No description provided by the author
No description provided by the author
KnownArchList returns the known architecture values, sorted.
KnownOSList returns the known operating system values, sorted.
LoadGoPlatforms loads the supported platforms supported by the go executable found on the PATH.
TODO: make sure CGO support is correct for the selected platform.
MatchFile reports whether the file with the given name matches the context and would be included in a Package created by ImportDir.
NewConstraint returns a new Constraint for the given constraint.Expr and build tags.
ParseConstraint parses the build constraints of a Go source file, if any.
No description provided by the author
No description provided by the author
ReadPackageNameTags evaluates the Go source file at path and returns the package name, if it can be used with build.Context ctxt, populates any build tags (if tags is not nil), and any error that occured.
TODO (CEV): rename.
ShouldBuild reports whether it is okay to use this file, and adds any build tags to allTags.
# Variables
DefaultGoPlatforms are the default supported Go platforms and are ordered by preference and "first class" support.
No description provided by the author
No description provided by the author
PreferredArchList is used to pick an Arch (GOARCH) when matching a build.Context to a file.
PreferredArchList is used to pick an OS (GOOS) when matching a build.Context to a file.
# Structs
A Constraint stores the build constraints of a Go source file and can be used to check if a file matches a build.Context.
A GoPlatform is a supported GOOS/GOARCH for go and is generated via: `go tool dist list`.
A MatchError describes an error matching a build.Context to a file.