File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ type DB interface {
26
26
UpsertFetchMeta (* models.FetchMeta ) error
27
27
}
28
28
29
+ // Option :
29
30
type Option struct {
30
31
RedisTimeout time.Duration
31
32
}
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ func CacheDir() string {
85
85
return filepath .Join (tmpDir , "go-exploitdb" )
86
86
}
87
87
88
+ // IsCommandAvailable :
88
89
func IsCommandAvailable (name string ) bool {
89
90
cmd := exec .Command (name , "--help" )
90
91
if err := cmd .Run (); err != nil {
@@ -93,6 +94,7 @@ func IsCommandAvailable(name string) bool {
93
94
return true
94
95
}
95
96
97
+ // Exists :
96
98
func Exists (path string ) (bool , error ) {
97
99
_ , err := os .Stat (path )
98
100
if err == nil {
@@ -104,6 +106,7 @@ func Exists(path string) (bool, error) {
104
106
return true , err
105
107
}
106
108
109
+ // Exec :
107
110
func Exec (command string , args []string ) (string , error ) {
108
111
cmd := exec .Command (command , args ... )
109
112
var stdoutBuf , stderrBuf bytes.Buffer
You can’t perform that action at this time.
0 commit comments