package internal import ( "fmt" "os/exec" ) type CommandNotFound string func (e CommandNotFound) Error() string { return fmt.Sprintf("command '%s' is missing and must be present for operation", string(e)) } func RequireCommand(cmd string) error { _, err := exec.LookPath(cmd) if err != nil { return CommandNotFound(cmd) } return nil }