io

package
v0.0.0-...-bb68feb Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPackageExists

func CheckPackageExists(name string, operators [][]string) bool

func GetExtra

func GetExtra(s string) (string, []string, error)

func GetExtraPackages

func GetExtraPackages(pkgName string, names []string) ([]string, error)

Parse and comparison extra packages provides by names. Returns error if extra not found or another parse error

func SingleThreadDownload

func SingleThreadDownload(packages []string, offset int, options *Options) (int, int, int64)

start single thread download files. Returns count of downloaded packages, dependencies and size in bytes

func UninstallPackages

func UninstallPackages(packages []string, collectDependencies, inRecurse bool) (int, int, int64)

Returns count of removed packages and total removed size in MB

Types

type Buffer

type Buffer struct {
	DownloadedBytes int
	Total           int
	// contains filtered or unexported fields
}

func (*Buffer) UpdateTotal

func (b *Buffer) UpdateTotal(value int)

func (*Buffer) Write

func (b *Buffer) Write(data []byte) (int, error)

type Options

type Options struct {
	Single bool // without dependencies
}

type Package

type Package struct {
	Name         string
	Operators    [][]string
	Version      string
	Dependencies []string
	Size         int64 // in bytes
}

func (*Package) DefaultInstall

func (pkg *Package) DefaultInstall(offset int) (string, error)

Returns pkgName

func (*Package) Prepare

func (pkg *Package) Prepare()

clean pkgName and split operators

Jump to

Keyboard shortcuts

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