io

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 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, libDir string, operators [][]string) bool

func SingleThreadDownload

func SingleThreadDownload(libDir string, packages []string, offset int) (int, int)

start single thread download files. Returns count downloaded packages and dependencies

func UninstallPackages

func UninstallPackages(libDir string, 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 Package

type Package struct {
	Name      string
	LibDir    string
	Operators [][]string
}

func (*Package) DefaultInstall

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

Returns pkgName, version, dependencies

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