Documentation
¶
Overview ¶
Package run provides a task for the Go toolchain "run" command. It requires at least Go version 1.17 which comes with support to run commands in module-aware mode, by passing version suffixes to `go run` arguments, without affecting the `main` module and will not "pollute" the `go.mod` file. See the documentation about how to compile and run Go programs for more details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is a task option.
func WithModulePath ¶
WithModulePath sets the module import path.
func WithModuleVersion ¶
func WithModuleVersion(version *semver.Version) Option
WithModuleVersion sets the module version.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options are task options.
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task is a task for the Go toolchain "run" command. It requires at least Go version 1.17 which comes with support to run commands in module-aware mode, by passing version suffixes to `go run` arguments, without affecting the `main` module and will not "pollute" the `go.mod` file anymore. See the documentation about how to compile and run Go programs for more details.
func (*Task) BuildParams ¶
BuildParams builds the parameters. Note that configured flags are applied after the "GOFLAGS" environment variable and could overwrite already defined flags.
See the Go command documentation about environment variables and the builtin helps for more details:
go help environment go help env