DisplayTextWithBold translates the template, bolds the templateValues, substitutes templateValues into the template, and outputs the result to ui.Out. Only the first map in templateValues is used.
(template string, templateValues ...map[string]interface{})
| 261 | // substitutes templateValues into the template, and outputs |
| 262 | // the result to ui.Out. Only the first map in templateValues is used. |
| 263 | func (ui *UI) DisplayTextWithBold(template string, templateValues ...map[string]interface{}) { |
| 264 | ui.terminalLock.Lock() |
| 265 | defer ui.terminalLock.Unlock() |
| 266 | |
| 267 | firstTemplateValues := getFirstSet(templateValues) |
| 268 | for key, value := range firstTemplateValues { |
| 269 | firstTemplateValues[key] = ui.modifyColor(fmt.Sprint(value), color.New(color.Bold)) |
| 270 | } |
| 271 | fmt.Fprintf(ui.Out, "%s\n", ui.TranslateText(template, firstTemplateValues)) |
| 272 | } |
| 273 | |
| 274 | // DisplayTextWithFlavor translates the template, bolds and adds cyan color to |
| 275 | // templateValues, substitutes templateValues into the template, and outputs |
nothing calls this directly
no test coverage detected