diff --git a/cmd/root.go b/cmd/root.go index dcdeb86..fb1cc2f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -27,9 +27,7 @@ func Init() { os.Exit(1) } - _, err := helpers.SnifferExists() - check(err) - db, err = buntdb.Open(getDbPath()) + db, err := buntdb.Open(getDbPath()) check(err) db.CreateIndex("apps", "*:app", buntdb.IndexString) db.CreateIndex("processes", "*:process", buntdb.IndexString) diff --git a/pkg/helpers/helpers.go b/pkg/helpers/helpers.go index 8b02971..94f94f8 100644 --- a/pkg/helpers/helpers.go +++ b/pkg/helpers/helpers.go @@ -14,15 +14,6 @@ const sniffer = "nethogs" var ErrVnstatDoesNotExist = fmt.Errorf("'%s' does not exist on this machine or not exposed on current user $PATH", sniffer) -func SnifferExists() (bool, error) { - r := CommandExists("nethogs") - if !r { - return false, ErrVnstatDoesNotExist - } - - return true, nil -} - func CommandExists(c string) bool { _, err := exec.LookPath(c) return err == nil