Skip to content

Commit

Permalink
ext: remove unneeded use of init()
Browse files Browse the repository at this point in the history
  • Loading branch information
jzelinskie authored and Katee committed Oct 18, 2018
1 parent 699d114 commit 8efc3e4
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion ext/vulnmdsrc/nvd/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,25 @@ type nvdCVSSv3 struct {
AvailImpact string `json:"availabilityImpact"`
}

var vectorValuesToLetters map[string]string
var vectorValuesToLetters = map[string]string{
"NETWORK": "N",
"ADJACENT_NETWORK": "A",
"LOCAL": "L",
"HIGH": "H",
"MEDIUM": "M",
"LOW": "L",
"NONE": "N",
"SINGLE": "S",
"MULTIPLE": "M",
"PARTIAL": "P",
"COMPLETE": "C",

// CVSSv3 only
"PHYSICAL": "P",
"REQUIRED": "R",
"CHANGED": "C",
"UNCHANGED": "U",
}

func init() {
vectorValuesToLetters = make(map[string]string)
Expand Down

0 comments on commit 8efc3e4

Please sign in to comment.