Documentation ¶
Index ¶
- func BinDep(name string) func(...string) error
- func BinDepOut(name string) func(...string) (string, error)
- func BinDepOutWithEnv(env map[string]string, name string) func(...string) (string, error)
- func BinDepWithEnv(env map[string]string, name string) func(...string) error
- func BinDir() string
- func BinExec(name string, stdout, stderr io.Writer) func(...string) error
- func BinPath(name string) string
- func DefBinDep(name, url, version, sha, entrypoint string, options ...Option)
- func DefGoDep(name, importPath, version, entrypoint string)
- func DefLibDep(name, url, sha, outputDir string, options ...Option)
- func ExtTmpDir() string
- func GetAllDeps()
- func GoBinDir() string
- func GoBinPath(name string) string
- func GoDep(name string) func(...string) error
- func GoDepOutput(name string) func(...string) (string, error)
- func GoDepOutputWith(name string) func(map[string]string, ...string) (string, error)
- func GoDepWithEnv(env map[string]string, name string) func(...string) error
- func LibDir() string
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinDep ¶
BinDep returns a command for running a binary dependency. Its output is sent to stdout.
func BinDepOut ¶
BinDepOut returns a command for running a binary dependency. Its output is returned.
func BinDepOutWithEnv ¶ added in v0.4.13
BinDepOutWithEnv returns a command for running a binary dependency. It accepts an env map for the new process. Its output is returned.
func BinDepWithEnv ¶
BinDepWithEnv returns a command for running a binary dependency. It accepts an env map for the new process. Its output is sent to stdout.
func BinDir ¶
func BinDir() string
BinDir returns the absolute path to the bin directory of tools that are not go.
func BinExec ¶ added in v0.4.11
BinExec returns a command for running a binary dependency. Its stdout and stderr are pipeped to the given writers.
func DefBinDep ¶
DefBinDep makes sure a dependency is downloaded and makes it available as a runnable command.
func DefGoDep ¶
func DefGoDep(name, importPath, version, entrypoint string)
DefGoDep defines a go dependency that can be installed using a command like `go install github.com/aserto-dev/foo@v1.2.3`
func GetAllDeps ¶
func GetAllDeps()
GetAllDeps explicitly goes through all dependencies and downloads them, even if they might not be used.
func GoBinDir ¶ added in v0.4.15
func GoBinDir() string
GoBinDir returns the absolute path to the bin directory of tools
func GoDepOutput ¶
GoDepOutput returns a command for running a go dependency. Its output is returned.
func GoDepOutputWith ¶
GoDepOutputWith returns a command for running a go dependency with env vars. Its output is returned.
func GoDepWithEnv ¶ added in v0.8.5
GoDepWithEnv returns a command for running a go dependency. It accepts an env map for the new process. Its output is sent to stdout.
Types ¶
type Option ¶
type Option func(*depOptions)
Option is a setting that changes the behavior of downloading and configuring a binary or a library
func WithLibPrefix ¶
WithLibPrefix tells us we should remove the specified prefix from the lib paths. This option can use the {{.Version}} template.
func WithTGzPaths ¶
WithTGzPaths tells us the binary or lib lives inside a tarred and gzipped archive
func WithTXzPaths ¶ added in v0.4.8
WithTXzPaths tells us the binary or lib lives inside a tarred and xz utility compressed archive
func WithZipPaths ¶
WithZipPaths tells us the binary or lib lives inside a zip archive