aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-01-31 17:18:06 -0500
committerPaul Duncan <pabs@pablotron.org>2022-01-31 17:18:06 -0500
commitf77d9ce238dc4c86a605770b33f27d2cb0d51eb3 (patch)
treed05c7d44ae99d44b17970a2314f34724d5dd8aad /main.go
parent08cd2d3e893e4f1298110594ca168e366a38d5aa (diff)
downloadcvez-f77d9ce238dc4c86a605770b33f27d2cb0d51eb3.tar.bz2
cvez-f77d9ce238dc4c86a605770b33f27d2cb0d51eb3.zip
add Makefile, internal/cvss/v{2,31}vector_test.go
Diffstat (limited to 'main.go')
-rw-r--r--main.go38
1 files changed, 4 insertions, 34 deletions
diff --git a/main.go b/main.go
index 8ee6953..84e16bb 100644
--- a/main.go
+++ b/main.go
@@ -2,9 +2,9 @@ package main
import (
"encoding/json"
- "fmt"
+ // "fmt"
"log"
- "nvd/internal/cvss"
+ // "nvd/internal/cvss"
"nvd/internal/feed"
"os"
)
@@ -26,39 +26,9 @@ func testFeedParser() {
}
}
-// test cvss v3.1 vector
-var testCvssV3 = "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H"
-
-// Test CVSS v3 parser.
-func testCvssV3Parser() {
- // parse vector, check for error
- v, err := cvss.NewVector(testCvssV3)
- if err != nil {
- log.Fatal(err)
- }
-
- fmt.Println(v.Metrics())
- fmt.Println(v)
-}
-
-// test cvss v2 vector
-var testCvssV2 = "AV:L/AC:L/Au:N/C:N/I:N/A:P"
-
-// Test cvss v2 parser
-func testCvssV2Parser() {
- // parse vector, check for error
- v, err := cvss.NewVector(testCvssV2)
- if err != nil {
- log.Fatal(err)
- }
-
- fmt.Println(v.Metrics())
- fmt.Println(v)
-}
-
func main() {
// testMetaParser()
// testFeedParser()
- testCvssV3Parser()
- testCvssV2Parser()
+ // testCvssV3Parser()
+ // testCvssV2Parser()
}