pmdetect

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageManager

type PackageManager int

PackageManager represents a list of common package managers

const (
	// OS native
	PmAPT PackageManager = iota
	PmAPK
	PmDNF
	PmPacman
	PmXBPS

	// Sandboxed, distro agnostic
	PmFlatpak
	PmSnap
)

func Detect

func Detect(root fs.FS) []PackageManager

Detect returns a list of package managers being used on the system. Root is the root filesystem of the system being analyzed.

func (PackageManager) ExistsOn

func (pm PackageManager) ExistsOn(root fs.FS) bool

ExistsOn returns whether or not the given package manager exists on the system. Root is the root filesystem of the system being analyzed.

func (PackageManager) String

func (pm PackageManager) String() string

Jump to

Keyboard shortcuts

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