apt

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRepo

func AddRepo(
	name string,
	keyURL string,
	keyHash string,
	repoURL string,
) error

AddRepo securely adds an APT repo with corresponding PGP key. See: https://wiki.debian.org/DebianRepository/UseThirdParty

Example:

if err := apt.AddRepo(
	"docker",
	"https://download.docker.com/linux/debian",
	"https://download.docker.com/linux/debian/gpg",
	"1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570",
); err != nil {
	return err
}
if err := apt.Update(0 * time.Second); err != nil {
	return err
}

func DpkgInstall

func DpkgInstall(pkgPath string) error

func Install

func Install(pkg ...string) error

func Remove

func Remove(pkg ...string) error

func Update

func Update(cacheValidity time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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