reliqarts/go-common

View on GitHub
cmd.go

Summary

Maintainability
A
0 mins
Test Coverage
package common

import "os/exec"

// CommandExists checks if a command exists.
func CommandExists(cmd string) bool {
    _, err := exec.LookPath(cmd)
    return err == nil
}