Documentation
¶
Overview ¶
Package gomodrun is the forgotten go tool that executes and caches binaries included in go.mod files. This makes it easy to version cli tools in your projects such as `golangci-lint` and `ginkgo` that are versioned locked to what you specify in `go.mod`. Binaries are cached by go version and package version.
Package gomodrun is the forgotten go tool that executes and caches binaries included in go.mod files. This makes it easy to version cli tools in your projects such as `golangci-lint` and `ginkgo` that are versioned locked to what you specify in `go.mod`. Binaries are cached by go version and package version.
Package gomodrun is the forgotten go tool that executes and caches binaries included in go.mod files. This makes it easy to version cli tools in your projects such as `golangci-lint` and `ginkgo` that are versioned locked to what you specify in `go.mod`. Binaries are cached by go version and package version.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCachedBin ¶
GetCachedBin returns the path to the cached binary, building it if it doesn't exist.
func GetCommandVersionedPkgPath ¶
GetCommandVersionedPkgPath extracts the command line tools package path and version from go.mod.
func GetPkgRoot ¶
GetPkgRoot gets your projects package root, allowing you to run gomodrun from any sub directory.
Types ¶
type Options ¶
type Options struct { Stdin io.Reader // Stdin passed to tool. Stdout io.Writer // Stdout passed to tool. Stderr io.Writer // Stderr passed to tool. Env []string // Array of environment variables passed to tool. PkgRoot string // Root directory of go.mod with tools. }
Options contains parameters that are passed to `exec.Command` when running the binary.