Documentation ¶
Overview ¶
Package management on the host system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FindPackageManager = func() (PacakgeManager, error) { if cachedManager != nil { return cachedManager, nil } possibleManagers := sys.SupportedPackageManagers() for _, mgr := range possibleManagers { if _, err := run.Find(mgr); err == nil && Managers[mgr] != nil { cachedManager = Managers[mgr] return Managers[mgr], nil } } return nil, errors.New("unable to find a supported package manager on host system") }
View Source
var Managers = map[string]PacakgeManager{
"apk": apk,
"apt": apt,
"brew": brew,
"dnf": dnf,
"snap": snap,
"pacman": pacman,
}
Functions ¶
func ResetCachedManager ¶
func ResetCachedManager()
Types ¶
Click to show internal directories.
Click to hide internal directories.