DisplayText translates the template, substitutes in templateValues, and outputs the result to ui.Out. Only the first map in templateValues is used.
(template string, templateValues ...map[string]interface{})
| 242 | // DisplayText translates the template, substitutes in templateValues, and |
| 243 | // outputs the result to ui.Out. Only the first map in templateValues is used. |
| 244 | func (ui *UI) DisplayText(template string, templateValues ...map[string]interface{}) { |
| 245 | ui.terminalLock.Lock() |
| 246 | defer ui.terminalLock.Unlock() |
| 247 | |
| 248 | fmt.Fprintf(ui.Out, "%s\n", ui.TranslateText(template, templateValues...)) |
| 249 | } |
| 250 | |
| 251 | // DisplayTextLiteral outputs the text to ui.Out without modification. |
| 252 | // This function should only be used when no translation or templating is required. |
no test coverage detected