Skip to content

Commit

Permalink
Explain purpose of VulnerabilityHumanEncoding
Browse files Browse the repository at this point in the history
adds a go doc explaining the purpose of the map containing mapping from
int encoded state to human friendly strings

Signed-off-by: Michal Wasilewski <mwasilewski@gmx.com>
  • Loading branch information
mwasilew2 committed Jun 15, 2023
1 parent fbbf002 commit 3197304
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sysfs/vulnerability.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const (
)

var (
// VulnerabilityHumanEncoding allows mapping the vulnerability state (encoded as an int) onto a human friendly
// string. It can be used by consumers of this library to expose to the user the state of the vulnerability.
VulnerabilityHumanEncoding = map[int]string{
VulnerabilityStateNotAffected: notAffected,
VulnerabilityStateVulnerable: vulnerable,
Expand Down

0 comments on commit 3197304

Please sign in to comment.