mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
Implements the dnf sub-package with Manager, VersionQuerier, Holder, Cleaner, FileOwner, RepoManager, KeyManager, Grouper, and NameNormalizer interfaces. Implements the rpm sub-package with Manager, FileOwner, and NameNormalizer interfaces. Both follow the existing pattern: exported methods on struct delegate to unexported functions, _linux.go for real implementations, _other.go with build-tag stubs, embedded snack.Locker for mutating operations, and compile-time interface checks. Includes parser tests for all output formats.
52 lines
1.2 KiB
Go
52 lines
1.2 KiB
Go
//go:build !linux
|
|
|
|
package rpm
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogrlx/snack"
|
|
)
|
|
|
|
func available() bool { return false }
|
|
|
|
func install(_ context.Context, _ []snack.Target, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func remove(_ context.Context, _ []snack.Target, _ ...snack.Option) error {
|
|
return snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func upgradeAll(_ context.Context, _ ...snack.Option) 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
|
|
}
|
|
|
|
func fileList(_ context.Context, _ string) ([]string, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func owner(_ context.Context, _ string) (string, error) {
|
|
return "", snack.ErrUnsupportedPlatform
|
|
}
|