Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultPackageType() (pts string, pti uint64)
- func GetCurrentGoVersion() (string, error)
- func GetCurrentGoVersionAll() (string, error)
- func GetGoVersion(goBinPath string) (string, error)
- func GetGoVersionAll(goBinPath string) (string, error)
- func GetPackageFilename(goversion, os, arch string, pType string) (string, error)
- type Client
- type Stats
Constants ¶
View Source
const ( TarBinary uint64 = iota + 1 MsiBinary PkgBinary ZipBinary )
Represent the package extension of the compressed go source code that are available at https://golang.org/dl/
Variables ¶
View Source
var ( // ErrSourceDoesNotExists represents the error when the remote file does not exists ErrSourceDoesNotExists = errors.New("remote file does not exists") )
View Source
var ( // ErrUnknowPackage error used when package is not Tar,Msi,pkg or zip ErrUnknowPackage = errors.New("unknow package") )
Functions ¶
func DefaultPackageType ¶
DefaultPackageType return the default package type for every supported system.
func GetCurrentGoVersion ¶
GetCurrentGoVersion returns the current version of go which is in the global path:
unix -> $PATH windows ->
func GetCurrentGoVersionAll ¶
GetCurrentGoVersionAll returns the full go version
func GetGoVersion ¶
GetGoVersion returns the current version of go which is in the path passed as parameter.
func GetGoVersionAll ¶
GetGoVersionAll returns the full go version by example: go version go1.14 linux/amd64
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the client used to download files
func DefaultClient ¶
DefaultClient will create the default client to download files, only receive source file and destiny file.
Click to show internal directories.
Click to hide internal directories.