Skip to content

Commit

Permalink
chore: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
MaineK00n committed Mar 25, 2022
1 parent fbf6af1 commit 8cf7688
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type DB interface {
UpsertFetchMeta(*models.FetchMeta) error
}

// Option :
type Option struct {
RedisTimeout time.Duration
}
Expand Down
3 changes: 3 additions & 0 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func CacheDir() string {
return filepath.Join(tmpDir, "go-exploitdb")
}

// IsCommandAvailable :
func IsCommandAvailable(name string) bool {
cmd := exec.Command(name, "--help")
if err := cmd.Run(); err != nil {
Expand All @@ -93,6 +94,7 @@ func IsCommandAvailable(name string) bool {
return true
}

// Exists :
func Exists(path string) (bool, error) {
_, err := os.Stat(path)
if err == nil {
Expand All @@ -104,6 +106,7 @@ func Exists(path string) (bool, error) {
return true, err
}

// Exec :
func Exec(command string, args []string) (string, error) {
cmd := exec.Command(command, args...)
var stdoutBuf, stderrBuf bytes.Buffer
Expand Down

0 comments on commit 8cf7688

Please sign in to comment.