versions

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package versions has the version manipulation functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersions

func CompareVersions(required string, version string) bool

CompareVersions compares a version with the required version

func ListLocalVersions

func ListLocalVersions() (result []string)

ListLocalVersions lists the local (installed) versions

func ParseVersionName

func ParseVersionName(version string) string

ParseVersionName removes the special character from HTML text

Types

type GoVersion

type GoVersion struct {
	Name       string
	LinuxAmd64 string
	LinuxArm64 string
	Source     string

	LinuxAmd64Checksum string
	LinuxArm64Checksum string
	SourceChecksum     string
}

GoVersion golang version representation

func FilterVersion

func FilterVersion(version string, versions []GoVersion) *GoVersion

FilterVersion filter version slice by name

func ListAvailableVersions

func ListAvailableVersions() []GoVersion

ListAvailableVersions lists available Go versions

func (*GoVersion) Download

func (v *GoVersion) Download() (filePath string, err error)

Download downloads this version

func (*GoVersion) GetChecksum added in v0.0.10

func (v *GoVersion) GetChecksum() string

func (*GoVersion) GetURL added in v0.0.7

func (v *GoVersion) GetURL() string

Jump to

Keyboard shortcuts

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