diff options
Diffstat (limited to 'internal/cvss/v30vector.go')
-rw-r--r-- | internal/cvss/v30vector.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/cvss/v30vector.go b/internal/cvss/v30vector.go index 951cd03..0d835a0 100644 --- a/internal/cvss/v30vector.go +++ b/internal/cvss/v30vector.go @@ -44,22 +44,22 @@ func (v v30Vector) Metrics() []Metric { // Create CVSS 3.0 vector from string. func newV30Vector(s string) (Vector, error) { + // strip version prefix, split into metric strings strs := strings.Split(s[len(v31Prefix):], "/") r := make([]v3Metric, len(strs)) - // walk metric strings + // build results for i, ms := range(strs) { - // convert metric string to metric + // get metric from string m, err := getV3Metric(V30, ms) if err != nil { return nil, err } - // add to results r[i] = m } - // build and return vector + // return result return v30Vector(r), nil } |