mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
- Common Manager interface, Package type, functional options - Sentinel errors for common package manager failures - Sub-package stubs for: pacman, aur, apk, apt, dpkg, dnf, rpm, flatpak, snap, pkg (FreeBSD), ports (OpenBSD) - detect/ package for auto-detection of system package manager - 0BSD license
32 lines
1.2 KiB
Go
32 lines
1.2 KiB
Go
package snack
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
// ErrNotInstalled is returned when a queried package is not installed.
|
|
ErrNotInstalled = errors.New("package is not installed")
|
|
|
|
// ErrNotFound is returned when a package cannot be found in any repository.
|
|
ErrNotFound = errors.New("package not found")
|
|
|
|
// ErrUnsupportedPlatform is returned when a package manager is not
|
|
// available on the current platform.
|
|
ErrUnsupportedPlatform = errors.New("package manager not available on this platform")
|
|
|
|
// ErrPermissionDenied is returned when an operation requires elevated
|
|
// privileges that were not provided.
|
|
ErrPermissionDenied = errors.New("permission denied; try WithSudo()")
|
|
|
|
// ErrAlreadyInstalled is returned when attempting to install a package
|
|
// that is already present.
|
|
ErrAlreadyInstalled = errors.New("package is already installed")
|
|
|
|
// ErrDependencyConflict is returned when a package has unresolvable
|
|
// dependency conflicts.
|
|
ErrDependencyConflict = errors.New("dependency conflict")
|
|
|
|
// ErrManagerNotFound is returned by detect when no supported package
|
|
// manager can be found on the system.
|
|
ErrManagerNotFound = errors.New("no supported package manager found")
|
|
)
|