Documentation ¶
Overview ¶
Package build provides a spell incantation for the "build" command of the Go toolchain.
Index ¶
Constants ¶
const (
// DefaultDistOutputDirName is the default directory name for production and distribution builds.
DefaultDistOutputDirName = "dist"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is a spell incantation option for the Go toolchain "build" command.
func WithBinaryArtifactName ¶
WithBinaryArtifactName sets the name for the binary build artifact.
func WithCrossCompileTargetPlatforms ¶
WithCrossCompileTargetPlatforms sets the names of cross-compile platform targets.
func WithFlags ¶
WithFlags sets additional flags to pass to the Go `build` command along with the base Go flags.
func WithGoOptions ¶
WithGoOptions sets shared Go toolchain commands options.
func WithOutputDir ¶
WithOutputDir sets the output directory, relative to the project root, for compilation artifacts.
type Options ¶
type Options struct { *spellGo.Options // BinaryArtifactName is the name for the binary build artifact. BinaryArtifactName string // CrossCompileTargetPlatforms are the names of cross-compile platform targets. // // See `go tool dist list` and the `go` command documentations for more details: // - https://github.com/golang/go/blob/master/src/cmd/dist/build.go CrossCompileTargetPlatforms []string // Flags are additional flags to pass to the Go `build` command along with the base Go flags. // // See `go help build` and the Go command documentation for more details: // - https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies Flags []string // OutputDir is the output directory, relative to the project root, for compilation artifacts. OutputDir string // contains filtered or unexported fields }
Options are spell incantation options for the Go toolchain "build" command.
func NewOptions ¶
NewOptions creates new spell incantation options for the Go toolchain "build" command.
type Spell ¶
type Spell struct {
// contains filtered or unexported fields
}
Spell is a spell incantation for the "build" command of the Go toolchain.