package pkg import "git.xdrm.io/go/nix-amer/internal/exec" type yum struct{ exec exec.Executor } func (d *yum) SetExecutor(_exec exec.Executor) { d.exec = _exec } func (d yum) Name() string { return "yum" } func (d yum) Fetch() error { return nil } func (d yum) Upgrade() error { return d.exec.Command(d.Name(), "update").Run() } func (d yum) Install(_pkg string) error { return d.exec.Command(d.Name(), "install", _pkg).Run() } func (d yum) Remove(_pkg string) error { return d.exec.Command(d.Name(), "remove", _pkg).Run() }