Documentation ¶
Index ¶
Constants ¶
const GODLURL = "https://storage.googleapis.com/golang/"
GODLURL is the url from which golang src tars can be dowloaded.
Variables ¶
This section is empty.
Functions ¶
func InstallVersion ¶
InstallVersion downloads, extracts and installs the given go version.
func OnlineAvailableVersions ¶
OnlineAvailableVersions returns a map of all found versions grouped by Minor number and with the latest patch of said Minor as value.
Types ¶
type Version ¶
type Version struct { // Major is the first tier of a version number. Major int // Minor is the second tier of a version number. Minor int // Patch is the final tier of a version number. Patch int }
Version represents a go version, since its intended for the source of released versions, no suffix/build is supported. TODO (perrito666) accept build/rc and figure how to determine newer.
func InstalledAvailableVersions ¶
func InstalledAvailableVersions() []Version
InstalledAvailableVersions returns a slice of the Versions that have a current install locally.
func NewestAvailableOnline ¶
NewestAvailableOnline returns the newest version available to download.
func VersionFromString ¶
VersionFromString returns a Version created from a valid string version of the form x.y.z or x.y
func (Version) CommonVersionString ¶
CommonVersionString returns a string representing the Major.Minor version of the version.
func (Version) IsNewerThan ¶
IsNewerThan returns true if the passed version is older than the current one.
func (Version) SameVersion ¶
SameVersion returns true if the passed version is of the same root than the current one, ie: 1.7.2 and 1.7.3.