Documentation
¶
Overview ¶
Package system contains some helpers for working with operating-system package management.
Currently only Debian GNU/Linux systems are supported, but that might change.
Index ¶
- Constants
- type Package
- func (p *Package) Install(name []string) error
- func (p *Package) IsInstalled(name string) (bool, error)
- func (p *Package) IsKnown() bool
- func (p *Package) System() string
- func (p *Package) Uninstall(name []string) error
- func (p *Package) Update() error
- func (p *Package) UsePrivilegeHelper(cmd string)
Constants ¶
View Source
const ( YUM = "YUM" DEBIAN = "DEBIAN" )
Known-system types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
Package maintains our object state
func New ¶
func New() *Package
New creates a new instance of this object, attempting to identify the system during the initial phase.
func (*Package) IsInstalled ¶
IsInstalled checks a package installed?
func (*Package) UsePrivilegeHelper ¶ added in v0.19.0
UsePrivilegeHelper is used to ensure that all executed commands are prefixed with "sudo ..", "doas ..", or similar.
Click to show internal directories.
Click to hide internal directories.