mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
flatpak: implements Manager, Cleaner, and RepoManager interfaces - Install/Remove/Purge/Upgrade with flatpak CLI - Repository management (add/remove/list remotes) - Autoremove unused runtimes snap: implements Manager and VersionQuerier interfaces - Install with --classic/--channel support via Target.FromRepo - Remove/Purge/Upgrade via snap CLI - Version queries with semver comparison - Upgrade availability via snap refresh --list Both packages follow the existing pattern: - Exported methods on struct delegate to unexported functions - _linux.go for real implementation, _other.go stubs - Compile-time interface checks - Parser tests for all output formats
68 lines
1.6 KiB
Go
68 lines
1.6 KiB
Go
//go:build !linux
|
|
|
|
package snap
|
|
|
|
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 purge(_ context.Context, _ []snack.Target, _ ...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
|
|
}
|
|
|
|
func latestVersion(_ context.Context, _ string) (string, error) {
|
|
return "", snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func listUpgrades(_ context.Context) ([]snack.Package, error) {
|
|
return nil, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func upgradeAvailable(_ context.Context, _ string) (bool, error) {
|
|
return false, snack.ErrUnsupportedPlatform
|
|
}
|
|
|
|
func versionCmp(_ context.Context, _, _ string) (int, error) {
|
|
return 0, snack.ErrUnsupportedPlatform
|
|
}
|