Documentation ¶
Overview ¶
Package manager contains the manager struct that handles to life-cycle of Go SDK installations.
Index ¶
- type GoManager
- func (m *GoManager) Cleanup() error
- func (m *GoManager) Install(versionNumber *version.Version, operatingSystem, arch string, ...) error
- func (m *GoManager) Select(versionNumber *version.Version) error
- func (m *GoManager) Uninstall(versionNumber *version.Version) error
- func (m *GoManager) UninstallAll() error
- func (m *GoManager) Unselect() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoManager ¶
type GoManager struct { // The root directory stores the installed SDKs as well as any configuration files. RootDirectory string // The collection of all currently installed versions of the Go SDK. InstalledVersions version.Collection // The currently selected version. The selected version is the release that is synced to the "selected" directory. Might // be nil, if no version is currently selected. SelectedVersion *version.Version // contains filtered or unexported fields }
The GoManager is responsible for managing Go SDK installations. It know about the currently installed SDKs, the current active SDK and has means to install additional SDKs, change which SDK is currently selected and remove existing installations.
func NewManager ¶
NewManager is a constructor for the GoManager struct. It reads through the given root directory and detects the current state and initializes the GoManager instance accordingly.
func (*GoManager) Cleanup ¶
Cleanup is a function that removes all Go SDK installations that are currently not considered stable. Feedback is directly printed to the stdout or stderr, so nothing is returned here.
func (*GoManager) Install ¶
func (m *GoManager) Install(versionNumber *version.Version, operatingSystem, arch string, releaseType releases.ReleaseType) error
Install is a function that installs new instances of the Go SDK. As installation parameters the version number, operating system and platform architecture are considered when choosing the correct installation artifacts. The releaseType parameter is used to limit the amount of accepted versions. Feedback is directly printed to the stdout or stderr, so nothing is returned here.
func (*GoManager) Select ¶
Select is a function that selects an existing installation of the Go SDK as the active one. Feedback is directly printed to the stdout or stderr, so nothing is returned here.
func (*GoManager) Uninstall ¶
Uninstall is a function that removes an existing installation of the Go SDK. Feedback is directly printed to the stdout or stderr, so nothing is returned here.
func (*GoManager) UninstallAll ¶
UninstallAll is a function that removes all current installations of the Go SDK.