cache

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2015 License: GPL-2.0 Imports: 20 Imported by: 8

Documentation

Index

Constants

View Source
const REPO = "https://github.com/golang/go.git"

Variables

View Source
var Output io.Writer = os.Stdout
View Source
var TARGET = filepath.Join(CacheDirectory(), "git")
View Source
var VenGO_PATH = filepath.Join(ExpandUser("~"), ".VenGO")

Functions

func AlreadyCompiled

func AlreadyCompiled(ver string) bool

determine if a Go version has been already compiled in the cache

func AvailableBinaries

func AvailableBinaries() []string

return back the list of donwloadable binaries

func AvailableDownloads

func AvailableDownloads() []string

return back all the available donwloads

func AvailableSources

func AvailableSources() []string

return back the list of downloaable sources

func CacheDirectory

func CacheDirectory() string

Return the CacheDirectory for not darwin Unix. By default it is ~/.cache/VenGO. On Linux, if the environemnt variable XDG_CACHE_HOME exists it will be XDG_CACHE_HOME/VenGO

func CacheDownload

func CacheDownload(ver string, f ...bool) error

Download an specific version of Golang source code

func CacheDownloadBinary

func CacheDownloadBinary(ver string, f ...bool) error

Download an specific version of Golang binary files

func CacheDownloadGit added in v1.1.1

func CacheDownloadGit(ver string, f ...bool) error

Download git repository and clone the given version

func CheckManifestIntegrity

func CheckManifestIntegrity(manifestName string) error

checks a manifest integrity

func Checksum

func Checksum(version string) (string, error)

check if a given version is supported by VenGO to auto donwload/compile if the version is valid, it returns it's SHA1 fingerprint, error is returned otherwise

func Compile

func Compile(ver string, verbose, nocgo bool, boostrap ...string) error

compile a given version of go in the cache

func Exists

func Exists(ver string) bool

checks for the existance of the given version in the cache

func ExpandUser

func ExpandUser(path string) string

Expand the user home tilde to the right user home path

func GetBinaryVersion

func GetBinaryVersion(version string) string

return back the binary string version for downloads in GNU/Linux

func GetInstalled

func GetInstalled(tags, sources, binaries []string) ([]string, error)

return a list of installed go versions

func GetNonInstalled

func GetNonInstalled(v, tags, sources, binaries []string) []string

return a list of non installed go versions

func GitExists added in v1.1.1

func GitExists() bool

func MercurialExists

func MercurialExists() bool

func SourceExists

func SourceExists(ver string) (bool, error)

func Tags

func Tags() []string

get git tags from git repo

Types

This section is empty.

Jump to

Keyboard shortcuts

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