lib

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENDPOINT = "https://storage.googleapis.com/golang/go$VERSION.windows-amd64.zip"
)
View Source
const (
	GOROOT = "C:\\Go"
)

Variables

View Source
var (
	ErrNotManaged       = errors.New("not managed")
	ErrNotASymlink      = errors.New("not a symlink")
	ErrPermissionDenied = errors.New("permission denied")
)

Functions

func CheckRemoteVersionExists

func CheckRemoteVersionExists(version string) (bool, error)
func CreateSymbolicLink(path, target string) error

func CreateSymbolicLinkWithElevation

func CreateSymbolicLinkWithElevation(path, target string) error

func CurrentGoVersion

func CurrentGoVersion(searchDir string) (string, error)

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 DownloadRemoteVersion(version string) (string, error)

func ExtractDownloadedGoVersion

func ExtractDownloadedGoVersion(dl string) (string, error)

func GoVersionOutput

func GoVersionOutput() (string, error)

func Goroot

func Goroot() string

func InstallGoVersion

func InstallGoVersion(version, source, destdir string) error

func InstalledGoVersions

func InstalledGoVersions(searchDir string) ([]string, error)
func IsSymlink(fi os.FileInfo) bool

func SetVerbose

func SetVerbose(v bool)

func SwitchGoVersion

func SwitchGoVersion(version, searchDir string) error

Removes the current GOROOT if it exists, then creates a new symlink at GOROOT to searchDir/Go<version>

func UninstallGoVersion

func UninstallGoVersion(version, searchDir string) error

func ValidateSemver

func ValidateSemver(version string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL