Documentation ¶
Index ¶
- Constants
- func CreateTempFile(rawContents []byte) (*os.File, error)
- func ExtractTarArchive(tarName string, contents []byte) error
- func ExtractZip(f *os.File) error
- func GetGitHubFullURL(pkgName, pkgTag string) string
- func GetPKGNameAndTag(paths []string) (pkgName, pkgTag string)
- func GitHubDownloader(url string) error
- func RsvGitHubAddr(GPAP string) string
- func RveContentsFromLink(link string) ([]byte, error)
Constants ¶
View Source
const ( GitHubPrefix = "https://github.com" ZipSuffix = ".zip" TargzSuffix = ".tar.gz" TagMaster = "master" )
Variables ¶
This section is empty.
Functions ¶
func CreateTempFile ¶
CreateTempFile create a temporary file by byte slice, return type *os.File.
func ExtractTarArchive ¶
ExtractTarArchive extract the tar file from memory.
func ExtractZip ¶
ExtractZip extract a zip file from a temporary file.
func GetGitHubFullURL ¶
GetGitHubFillURL generate a full github download address.
func GetPKGNameAndTag ¶
func GitHubDownloader ¶
GitHubDownloader retrieve file and extract.
func RsvGitHubAddr ¶
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 ¶
RevContentsFromLink retrieve package from a given link.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.