Documentation ¶
Index ¶
- Constants
- Variables
- func ToAnyArch(archType, osType string) string
- func ToAnyOs(archType, osType string) string
- func ToDarwinX64(archType, osType string) string
- func ToUniverseForMac(archType, osType string) string
- func ToUnixArch(archType, osType string) string
- func ToUnixOs(archType, osType string) string
- func ToWindowsOnly(archType, osType string) string
- type VersionInfo
- func (v *VersionInfo) GetSortedVersionList() (r []string)
- func (v *VersionInfo) GetVersions() map[string]VersionList
- func (v *VersionInfo) Parse()
- func (v *VersionInfo) RegisterArchHandler(f func(archType, osType string) string)
- func (v *VersionInfo) RegisterOsHandler(f func(archType, osType string) string)
- type VersionItem
- type VersionList
Constants ¶
View Source
const (
RemoteVersionFilePattern string = "https://raw.githubusercontent.com/gvcgo/resources/main/%s.version.json"
)
Variables ¶
View Source
var ArchHandlerList = map[string]func(archType, osType string) string{ "gradle": ToAnyArch, "groovy": ToAnyArch, "gsudo": ToAnyArch, "maven": ToAnyArch, "neovim": ToUniverseForMac, "python": ToAnyArch, "pypy": ToAnyArch, "rust": ToAnyArch, "sdkmanager": ToAnyArch, "vscode": ToDarwinX64, "scala": ToAnyArch, "v": ToAnyArch, }
Functions ¶
func ToDarwinX64 ¶
func ToUniverseForMac ¶
func ToUnixArch ¶
func ToWindowsOnly ¶
Types ¶
type VersionInfo ¶
type VersionInfo struct { List map[string]VersionList // full version list CurrentList map[string]VersionList // version list for current Arch and Os. AppName string // name in AppList ArchHandler func(archType, osType string) string OsHandler func(archType, osType string) string // contains filtered or unexported fields }
func NewVInfo ¶
func NewVInfo(appName string) (vi *VersionInfo)
func (*VersionInfo) GetSortedVersionList ¶
func (v *VersionInfo) GetSortedVersionList() (r []string)
func (*VersionInfo) GetVersions ¶
func (v *VersionInfo) GetVersions() map[string]VersionList
func (*VersionInfo) Parse ¶
func (v *VersionInfo) Parse()
func (*VersionInfo) RegisterArchHandler ¶
func (v *VersionInfo) RegisterArchHandler(f func(archType, osType string) string)
func (*VersionInfo) RegisterOsHandler ¶
func (v *VersionInfo) RegisterOsHandler(f func(archType, osType string) string)
type VersionItem ¶
type VersionList ¶
type VersionList []VersionItem
Click to show internal directories.
Click to hide internal directories.