Documentation
¶
Index ¶
- type Config
- type Manager
- func (m *Manager) Contains(v *Version) (found bool, err error)
- func (m *Manager) GetCurrentVersion() (*Version, error)
- func (m *Manager) InstallToolchainFS(toolchain fs.FS, v *Version) (err error)
- func (m *Manager) ListVersions() ([]*Version, error)
- func (m *Manager) Remove(v *Version)
- func (m *Manager) SetCurrentVersion(v *Version) error
- type Versiondeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RootDir string
ToolchainDir string
DownloadDir string
VersionFile string
} //func
Config contains configuration values.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a Config with the default location provided. It assumes the user as a home directory. If none is available this function will panic.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
} //struct
Manager queries and modifies a Go toolchains directory.
func NewManager ¶
NewManager creates a new Manager. If the provided Config is nil then DefaultConfig() is called and used.nil
func (*Manager) GetCurrentVersion ¶
GetCurrentVersion reads the current Version from the current version file.
func (*Manager) InstallToolchainFS ¶
InstallToolchainFS will install a Go toolchain from the provided toolchain. It will install it useing the provided Version so that multiple toolchain verions may be installed simultaneously.
func (*Manager) ListVersions ¶
ListVersions will list all the Versions.
func (*Manager) SetCurrentVersion ¶
SetCurrentVerion will set the current version to the provided Version.