utils

package
v0.0.0-...-76f50f1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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

func RegexCapture(pattern string, str string) string

Execute regex and return first captured group

Types

type Link struct {
	Url     string `json:"url"`
	Hash    string `json:"hash"`
	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

Jump to

Keyboard shortcuts

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