mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
Adds full pacman wrapper with: - All Manager interface methods (Install, Remove, Purge, Upgrade, Update, List, Search, Info, IsInstalled, Version, Available) - Linux implementation using exec.CommandContext - Non-linux stubs returning ErrUnsupportedPlatform - Output parsing for -Q, -Ss, -Si formats - Options support: WithSudo, WithAssumeYes, WithDryRun, WithRoot - Unit tests for parsing and argument building
52 lines
1.1 KiB
Go
52 lines
1.1 KiB
Go
//go:build !linux
|
|
|
|
package pacman
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogrlx/snack"
|
|
)
|
|
|
|
func available() bool { return false }
|
|
|
|
func install(_ context.Context, _ []string, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func remove(_ context.Context, _ []string, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func purge(_ context.Context, _ []string, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func upgrade(_ context.Context, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func update(_ context.Context) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func list(_ context.Context) ([]snack.Package, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func search(_ context.Context, _ string) ([]snack.Package, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func info(_ context.Context, _ string) (*snack.Package, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func isInstalled(_ context.Context, _ string) (bool, error) {
|
|
return false, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func version(_ context.Context, _ string) (string, error) {
|
|
return "", snack.ErrUnsupportedPlatform
|
|
}
|