Skip to content

Commit

Permalink
nvd api
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Jan 22, 2024
1 parent 3984d5e commit b669b52
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
pb "gopkg.in/cheggaaa/pb.v1"
)

var vulnListDir = filepath.Join(CacheDir(), "vuln-list")

func CacheDir() string {
cacheDir, err := os.UserCacheDir()
if err != nil {
Expand All @@ -28,8 +30,12 @@ func CacheDir() string {
return dir
}

func SetVulnListDir(dir string) {
vulnListDir = dir
}

func VulnListDir() string {
return filepath.Join(CacheDir(), "vuln-list")
return vulnListDir
}

func SaveCVEPerYear(dirPath string, cveID string, data interface{}) error {
Expand Down

0 comments on commit b669b52

Please sign in to comment.