Documentation ¶
Overview ¶
Package install provides a task for the Go toolchain "install" command. It requires at least Go version 1.16 which comes with support to install commands via `go install` (1) without affecting the `main` module and will not "pollute" the `go.mod` file (2) anymore. See https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies for more details about the `go install` command.
References
(1) https://blog.golang.org/go116-module-changes#TOC_4. (2) https://blog.golang.org/go116-module-changes#TOC_3.
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 "install" command. It requires at least Go version 1.16 which comes with support to install commands via `go install` (1) without affecting the `main` module and will not "pollute" the `go.mod` file (2) anymore. See https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies for more details about the `go install` command.
References
(1) https://blog.golang.org/go116-module-changes#TOC_4. (2) https://blog.golang.org/go116-module-changes#TOC_3.
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 `go help environment`, `go help env` and the `go` command documentations for more details: https://golang.org/cmd/go/#hdr-Environment_variables