Documentation ¶
Overview ¶
Package pkg handles basic operations in the management of packages in operating systems.
Important ¶
If you are going to use a package manager different to Deb, then you should check the options since I cann't test all.
TODO ¶
Add managers of BSD systems.
Use flag to do not show questions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detect ¶
func Detect() (PackageType, Packager, error)
Detect tries to get the package manager used in the system, looking for executables in directory "/usr/bin".
Types ¶
type PackageType ¶
type PackageType int
PackageType represents a package management system.
const ( Deb PackageType = iota + 1 RPM Pacman Ebuild ZYpp )
type Packager ¶
type Packager interface { // Install installs a program. Install(...string) error // Remove removes a program. Remove(bool, ...string) error // Purge removes a program and its config files. Purge(bool, ...string) error // Clean erases downloaded archive files. Clean() error // Upgrade upgrades all the packages on the system. Upgrade() error }
func New ¶
func New(p PackageType) Packager
New returns the interface to handle the package manager.
Click to show internal directories.
Click to hide internal directories.