Documentation
¶
Index ¶
- Constants
- func FetchLocalVersions(sdkDir string) ([]string, error)
- func Install(cacheFilePath, sdkFilePath, downloadFileUrl string) error
- func Uninstall(version, sdkFilePath string) error
- func Use(version, sdkDir, localVersionFilePath string, isEval bool) error
- type File
- type OriginVersion
- type Version
- type VersionOption
Constants ¶
View Source
const ( DefaultSdkDir = "~/go/sdk" DefaultCacheDir = "~/.gvm/cache" DefaultOriginURL = "https://go.dev/dl/?mode=json&include=all" DefaultDownloadURL = "https://dl.google.com/go/" DefaultVersionFilePath = "~/.gvm/versions.json" DefaultLocalVersionFilePath = "~/.gvm/version" )
Variables ¶
This section is empty.
Functions ¶
func FetchLocalVersions ¶
Types ¶
type OriginVersion ¶
type OriginVersion struct {
Version string `json:"version"`
Stable bool `json:"stable"`
Files []File `json:"files"`
}
func FetchOriginVersions ¶
func FetchOriginVersions(originURL, versionFilePath string, forceUpdate bool) ([]OriginVersion, error)
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
func NewVersion ¶
func NewVersion(opts ...VersionOption) *Version
type VersionOption ¶
type VersionOption func(*Version)
func WithCacheDir ¶
func WithCacheDir(cacheDir string) VersionOption
func WithDownloadURL ¶
func WithDownloadURL(downloadURL string) VersionOption
func WithOriginURL ¶
func WithOriginURL(originURL string) VersionOption
func WithSdkDir ¶
func WithSdkDir(sdkDir string) VersionOption
Click to show internal directories.
Click to hide internal directories.