From ce92ab3114dc8f5d9654dbfeecefb44049ea1a0c Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 1 Feb 2022 23:53:56 -0500 Subject: internal/cvss: add isVectorString tests --- internal/cvss/cvss.go | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'internal/cvss/cvss.go') diff --git a/internal/cvss/cvss.go b/internal/cvss/cvss.go index 9839e84..2bae0d7 100644 --- a/internal/cvss/cvss.go +++ b/internal/cvss/cvss.go @@ -21,29 +21,3 @@ type Metric interface { // Return string representation of metric. String() string } - -// CVSS metric vector. -type Vector interface { - // Get CVSS version. - Version() Version - - // Get CVSS vector string. - String() string - - // Return metrics in this vector. - Metrics() []Metric -} - -// Create new CVSS vector from vector string. -func NewVector(s string) (Vector, error) { - if isV31VectorString(s) { - // create CVSS v3.1 vector. - return newV31Vector(s) - } else if isV30VectorString(s) { - // create CVSS v3.0 vector. - return newV30Vector(s) - } else { - // create CVSS V2 vector - return newV2Vector(s) - } -} -- cgit v1.2.3