Documentation
¶
Index ¶
Constants ¶
View Source
const REG_ARCH = `(?P<arch>i386|amd(?:64)?|arm(?:64)?(?:el|hf)?|mips(?:64)?(?:el)?|ppc(?:64)?(?:el)?|s390x?|x86_64|(?:32|64)bits?)`
Arch regex
View Source
const REG_VERSION = `(?P<version>\d+[-.]\d+(?:[-.]\d+)?)`
Version regex
Variables ¶
This section is empty.
Functions ¶
func RegexCapture ¶
Execute regex and return first captured group
Types ¶
type Link ¶
type Link struct {
Url string `json:"url"`
Hash string `json:"hash"`
Hashfile string `json:"hashfile"`
Version string `json:"version"`
Arch string `json:"arch"`
}
Link structure
func Scrap ¶
func Scrap(uri string, pats map[string]string, bar *progressbar.ProgressBar) ([]*Link, error)
Scrap a distribution mirror
Click to show internal directories.
Click to hide internal directories.