Documentation
¶
Index ¶
- Constants
- Variables
- func CheckRemoteVersionExists(version string) (bool, error)
- func CreateSymbolicLink(path, target string) error
- func CreateSymbolicLinkWithElevation(path, target string) error
- func CurrentGoVersion(searchDir string) (string, error)
- func DownloadRemoteVersion(version string) (string, error)
- func ExtractDownloadedGoVersion(dl string) (string, error)
- func GoVersionOutput() (string, error)
- func Goroot() string
- func InstallGoVersion(version, source, destdir string) error
- func InstalledGoVersions(searchDir string) ([]string, error)
- func IsSymlink(fi os.FileInfo) bool
- func SetVerbose(v bool)
- func SwitchGoVersion(version, searchDir string) error
- func UninstallGoVersion(version, searchDir string) error
- func ValidateSemver(version string) bool
Constants ¶
View Source
const (
ENDPOINT = "https://storage.googleapis.com/golang/go$VERSION.windows-amd64.zip"
)
View Source
const (
GOROOT = "C:\\Go"
)
Variables ¶
Functions ¶
func CreateSymbolicLink ¶
func CurrentGoVersion ¶
Checks if GOROOT is a directory symlink pointing to a Go installation inside GOVM_HOME, returning the version string of the Go installation it points at. Returns the empty string if GOROOT does not exist Returns ErrNotASymlink if GOROOT is not a symlink Returns ErrNotManaged if GOROOT does not point inside GOVM_HOME but is a symlink
If err == ErrNotManaged, GOROOT can still be safely deleted and relinked.
func DownloadRemoteVersion ¶
func GoVersionOutput ¶
func InstallGoVersion ¶
func InstalledGoVersions ¶
func SetVerbose ¶
func SetVerbose(v bool)
func SwitchGoVersion ¶
Removes the current GOROOT if it exists, then creates a new symlink at GOROOT to searchDir/Go<version>
func UninstallGoVersion ¶
func ValidateSemver ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.