gvm

package module
v0.0.0-...-881013b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 14 Imported by: 0

README

Golang Version Manager (gvm)

GitHub go.mod Go version Release License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentVersion

func CurrentVersion() (string, bool, error)

func Download

func Download(version, savepath string, bar *pb.ProgressBar) (string, error)

Download downloads the Go binary for the specified version.

func Install

func Install(version string, archive string) error

func ListLocalVersions

func ListLocalVersions() ([]string, error)

ListLocalVersions returns a list of all locally installed versions.

func Uninstall

func Uninstall(version string) error

Types

type File

type File struct {
	Filename string `json:"filename"`
	Os       string `json:"os"`
	Arch     string `json:"arch"`
	Size     int64  `json:"size"`
	Sha256   string `json:"sha256"`
	Version  string `json:"version"`
	Kind     string `json:"kind"`
}

type Version

type Version struct {
	Version string `json:"version"`
	Stable  bool   `json:"stable"`
	Files   []File `json:"files"`
}

func LatestStableVersion

func LatestStableVersion() (Version, error)

LatestStableVersion returns the latest stable version of the go.

func ListRemote

func ListRemote(stable ...bool) ([]Version, error)

ListRemote returns the available versions of Go from the official download page, filtered by the stable parameter. If the stable parameter is omitted, all versions are returned. The returned versions are sorted by their version number, from the newest to the oldest.

Directories

Path Synopsis
cmd
gvm

Jump to

Keyboard shortcuts

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