aboutsummaryrefslogtreecommitdiff
path: root/internal/cvss/v2metric.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cvss/v2metric.go')
-rw-r--r--internal/cvss/v2metric.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/cvss/v2metric.go b/internal/cvss/v2metric.go
index a80cf8a..2dee41a 100644
--- a/internal/cvss/v2metric.go
+++ b/internal/cvss/v2metric.go
@@ -236,6 +236,9 @@ func getV2Metric(s string) (v2Metric, error) {
// Get CVSS 2.0 metric key.
func (m v2Metric) Key() Key {
- k, _ := v2KeyLut[m]
- return k
+ if k, ok := v2KeyLut[m]; ok {
+ return k
+ } else {
+ return v2InvalidKey
+ }
}