github.com/quay/claircore@v1.5.28/debian/severity.go (about)

     1  package debian
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/quay/claircore"
     7  )
     8  
     9  func normalizeSeverity(severity string) claircore.Severity {
    10  	switch strings.ToLower(severity) {
    11  	case "unimportant":
    12  		return claircore.Low
    13  	case "low":
    14  		return claircore.Medium
    15  	case "medium":
    16  		return claircore.High
    17  	case "high":
    18  		return claircore.Critical
    19  	default:
    20  		return claircore.Unknown
    21  	}
    22  }