MCPcopy Create free account
hub / github.com/diillson/chatcli / riskColor

Function riskColor

cli/skill_handler.go:1055–1070  ·  view source on GitHub ↗

riskColor returns the appropriate color for a risk level.

(risk string)

Source from the content-addressed store, hash-verified

1053
1054// riskColor returns the appropriate color for a risk level.
1055func 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.
1073func (sh *SkillHandler) ShowRegistries() {

Calls

no outgoing calls