riskColor returns the appropriate color for a risk level.
(risk string)
| 1053 | |
| 1054 | // riskColor returns the appropriate color for a risk level. |
| 1055 | func riskColor(risk string) string { |
| 1056 | switch strings.ToLower(risk) { |
| 1057 | case "safe": |
| 1058 | return ColorGreen |
| 1059 | case "low": |
| 1060 | return ColorGreen |
| 1061 | case "medium": |
| 1062 | return ColorYellow |
| 1063 | case "high": |
| 1064 | return ColorRed |
| 1065 | case "critical": |
| 1066 | return ColorRed |
| 1067 | default: |
| 1068 | return ColorGray |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | // ShowRegistries displays all configured registries. |
| 1073 | func (sh *SkillHandler) ShowRegistries() { |
no outgoing calls