github.com/quay/claircore@v1.5.28/suse/normalizeseverity.go (about) 1 package suse 2 3 import "github.com/quay/claircore" 4 5 const ( 6 None = "None" 7 Low = "Low" 8 Moderate = "Moderate" 9 Important = "Important" 10 Critical = "Critical" 11 ) 12 13 func NormalizeSeverity(severity string) claircore.Severity { 14 switch severity { 15 case None: 16 return claircore.Unknown 17 case Low: 18 return claircore.Low 19 case Moderate: 20 return claircore.Medium 21 case Important: 22 return claircore.High 23 case Critical: 24 return claircore.Critical 25 default: 26 return claircore.Unknown 27 } 28 }