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

Function printInfoRow

cli/skill_handler.go:798–803  ·  view source on GitHub ↗

printInfoRow renders a "label: value" row when value is non-empty; no-op otherwise. Centralizes the prefix/colorize/i18n boilerplate.

(labelKey, value, labelColor string)

Source from the content-addressed store, hash-verified

796// printInfoRow renders a "label: value" row when value is non-empty; no-op
797// otherwise. Centralizes the prefix/colorize/i18n boilerplate.
798func printInfoRow(labelKey, value, labelColor string) {
799 if value == "" {
800 return
801 }
802 fmt.Printf(" %s %s\n", colorize(i18n.T(labelKey)+":", labelColor), value)
803}
804
805// pickFirstNonEmpty returns the first non-empty string from its arguments,
806// or "" when every argument is empty. Lets row helpers express

Callers 1

printSkillInfoDetailsMethod · 0.85

Calls 2

TFunction · 0.92
colorizeFunction · 0.85

Tested by

no test coverage detected