down

package
v0.0.0-...-bcacd0f Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GitHubPrefix = "https://github.com"
	ZipSuffix    = ".zip"
	TargzSuffix  = ".tar.gz"
	TagMaster    = "master"
)

Variables

This section is empty.

Functions

func CreateTempFile

func CreateTempFile(rawContents []byte) (*os.File, error)

CreateTempFile create a temporary file by byte slice, return type *os.File.

func ExtractTarArchive

func ExtractTarArchive(tarName string, contents []byte) error

ExtractTarArchive extract the tar file from memory.

func ExtractZip

func ExtractZip(f *os.File) error

ExtractZip extract a zip file from a temporary file.

func GetGitHubFullURL

func GetGitHubFullURL(pkgName, pkgTag string) string

GetGitHubFillURL generate a full github download address.

func GetPKGNameAndTag

func GetPKGNameAndTag(paths []string) (pkgName, pkgTag string)

func GitHubDownloader

func GitHubDownloader(url string) error

GitHubDownloader retrieve file and extract.

func RsvGitHubAddr

func RsvGitHubAddr(GPAP string) string

RsvGitHubAddr resolve github's package download address from raw address. parameter GPAP meaning: GitHub Package Address Protocol, such as "git://github.com/user/package^1.2.1".

func RveContentsFromLink(link string) ([]byte, error)

RevContentsFromLink retrieve package from a given link.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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