pkg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Homebrew

type Homebrew struct{}

Homebrew implements the Manager interface for macOS Homebrew

func (*Homebrew) Bundle

func (h *Homebrew) Bundle(brewfilePath string) error

Bundle runs brew bundle with the specified Brewfile

func (*Homebrew) Install

func (h *Homebrew) Install(packages ...string) error

Install installs packages using Homebrew (batch install)

func (*Homebrew) IsInstalled

func (h *Homebrew) IsInstalled(pkg string) bool

IsInstalled checks if a package is installed via Homebrew

func (*Homebrew) Name

func (h *Homebrew) Name() string

Name returns the name of the package manager

type Manager

type Manager interface {
	Install(packages ...string) error
	IsInstalled(pkg string) bool
	Name() string
}

Manager defines the interface for package managers

func NewManager

func NewManager(os string) Manager

NewManager creates a package manager based on the OS

type Noop

type Noop struct{}

Noop is a no-op package manager for unsupported platforms

func (*Noop) Install

func (n *Noop) Install(packages ...string) error

func (*Noop) IsInstalled

func (n *Noop) IsInstalled(pkg string) bool

func (*Noop) Name

func (n *Noop) Name() string

type Yay

type Yay struct{}

Yay implements the Manager interface for Arch Linux yay

func (*Yay) Install

func (y *Yay) Install(packages ...string) error

Install installs packages using yay (batch install) yay handles both pacman repos and AUR packages

func (*Yay) IsInstalled

func (y *Yay) IsInstalled(pkg string) bool

IsInstalled checks if a package is installed via yay/pacman

func (*Yay) Name

func (y *Yay) Name() string

Name returns the name of the package manager

Jump to

Keyboard shortcuts

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