Documentation
¶
Overview ¶
Package versions handles all operations pertaining to specific versions. Install, uninstall, etc...
Index ¶
- func AllVersions(plugin plugins.Plugin) (versions []string, err error)
- func Install(conf config.Config, plugin plugins.Plugin, dir string, stdOut io.Writer, ...) error
- func InstallAll(conf config.Config, dir string, stdOut io.Writer, stdErr io.Writer) (failures []error)
- func InstallOneVersion(conf config.Config, plugin plugins.Plugin, versionStr string, ...) error
- func InstallVersion(conf config.Config, plugin plugins.Plugin, version toolversions.Version, ...) error
- func Latest(plugin plugins.Plugin, query string) (version string, err error)
- func Uninstall(conf config.Config, plugin plugins.Plugin, rawVersion string, ...) error
- type NoVersionSetError
- type UninstallableVersionError
- type VersionAlreadyInstalledError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllVersions ¶
AllVersions returns a slice of all available versions for the tool managed by the given plugin by invoking the plugin's list-all callback
func Install ¶
func Install(conf config.Config, plugin plugins.Plugin, dir string, stdOut io.Writer, stdErr io.Writer) error
Install installs all specified versions of a tool for the current directory. Typically this will just be a single version, if not already installed, but it may be multiple versions if multiple versions for the tool are specified in the .tool-versions file.
func InstallAll ¶
func InstallAll(conf config.Config, dir string, stdOut io.Writer, stdErr io.Writer) (failures []error)
InstallAll installs all specified versions of every tool for the current directory. Typically this will just be a single version, if not already installed, but it may be multiple versions if multiple versions for the tool are specified in the .tool-versions file.
func InstallOneVersion ¶
func InstallOneVersion(conf config.Config, plugin plugins.Plugin, versionStr string, keepDownload bool, stdOut io.Writer, stdErr io.Writer) error
InstallOneVersion installs a specific version of a specific tool
func InstallVersion ¶
func InstallVersion(conf config.Config, plugin plugins.Plugin, version toolversions.Version, stdOut io.Writer, stdErr io.Writer) error
InstallVersion installs a version of a specific tool, the version may be an exact version, or it may be `latest` or `latest` a regex query in order to select the latest version matching the provided pattern.
Types ¶
type NoVersionSetError ¶
type NoVersionSetError struct {
// contains filtered or unexported fields
}
NoVersionSetError is returned whenever an operation that requires a version is not able to resolve one.
func (NoVersionSetError) Error ¶
func (e NoVersionSetError) Error() string
type UninstallableVersionError ¶
type UninstallableVersionError struct {
// contains filtered or unexported fields
}
UninstallableVersionError is an error returned if someone tries to install the system version.
func (UninstallableVersionError) Error ¶
func (e UninstallableVersionError) Error() string
type VersionAlreadyInstalledError ¶ added in v0.16.3
type VersionAlreadyInstalledError struct {
// contains filtered or unexported fields
}
VersionAlreadyInstalledError is returned whenever a version is already installed.
func (VersionAlreadyInstalledError) Error ¶ added in v0.16.3
func (e VersionAlreadyInstalledError) Error() string