Auto-generate annotation docs (#11820)
This commit is contained in:
parent
eee2760907
commit
cf8e374290
10 changed files with 407 additions and 53 deletions
|
|
@ -210,6 +210,21 @@ func StringRiskToRisk(risk string) AnnotationRisk {
|
|||
}
|
||||
}
|
||||
|
||||
func (a AnnotationRisk) ToString() string {
|
||||
switch a {
|
||||
case AnnotationRiskCritical:
|
||||
return "Critical"
|
||||
case AnnotationRiskHigh:
|
||||
return "High"
|
||||
case AnnotationRiskMedium:
|
||||
return "Medium"
|
||||
case AnnotationRiskLow:
|
||||
return "Low"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
}
|
||||
|
||||
func normalizeString(input string) string {
|
||||
trimmedContent := []string{}
|
||||
for _, line := range strings.Split(input, "\n") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue