nix-amer/internal/pkg/yum.go

26 lines
420 B
Go
Raw Normal View History

package pkg
import (
"os/exec"
)
type yum struct{}
func (d yum) Name() string { return "yum" }
func (d yum) Fetch() error {
return nil
}
func (d yum) Upgrade() error {
return exec.Command(d.Name(), "update").Run()
}
func (d yum) Install(_pkg string) error {
return exec.Command(d.Name(), "install", _pkg).Run()
}
func (d yum) Remove(_pkg string) error {
return exec.Command(d.Name(), "remove", _pkg).Run()
}