Documentation
¶
Overview ¶
Package pkgmanager tells whether a binary was installed by a package manager, so a self-updater can defer to that manager rather than replace a file it tracks (gtb#129).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector finds the package manager, if any, that owns a binary.
type Install ¶
type Install struct {
Manager Manager
Package string
// Path is the binary's path with symlinks resolved.
Path string
}
Install is a binary a package manager owns.
func (Install) UpgradeCommand ¶
UpgradeCommand is the package manager's own command for upgrading the package.
type Manager ¶
type Manager string
Manager names a package manager that can own an installed binary.
const ( // HomebrewFormula is a binary under a Homebrew Cellar. HomebrewFormula Manager = "Homebrew formula" // HomebrewCask is a binary under a Homebrew Caskroom. HomebrewCask Manager = "Homebrew cask" // Dpkg is a file dpkg records as installed by a .deb package. Dpkg Manager = "dpkg" // RPM is a file the RPM database records as installed by a package. RPM Manager = "rpm" )
Click to show internal directories.
Click to hide internal directories.