We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29e5cea commit 98fccb3Copy full SHA for 98fccb3
1 file changed
vulnfeeds/cmd/converters/cve/nvd-cve-osv/main.go
@@ -50,6 +50,11 @@ func loadCPEDictionary(productToRepo *cves.VPRepoCache, f string) error {
50
51
func main() {
52
flag.Parse()
53
+ if !slices.Contains([]string{"OSV", "PackageInfo"}, *outFormat) {
54
+ fmt.Fprintf(os.Stderr, "Unsupported output format: %s\n", *outFormat)
55
+ os.Exit(1)
56
+ }
57
+
58
if *cpuProfile != "" {
59
f, err := os.Create(*cpuProfile)
60
if err != nil {
@@ -62,11 +67,6 @@ func main() {
62
67
defer pprof.StopCPUProfile()
63
68
}
64
69
65
- if !slices.Contains([]string{"OSV", "PackageInfo"}, *outFormat) {
66
- fmt.Fprintf(os.Stderr, "Unsupported output format: %s\n", *outFormat)
- os.Exit(1)
- }
-
70
logger.InitGlobalLogger()
71
72
data, err := os.ReadFile(*jsonPath)
0 commit comments