MCPcopy Index your code
hub / github.com/cloudfoundry/cli / DisplayText

Method DisplayText

util/ui/ui.go:244–249  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

242// DisplayText translates the template, substitutes in templateValues, and
243// outputs the result to ui.Out. Only the first map in templateValues is used.
244func (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.

Callers 1

DisplayTextMenuMethod · 0.95

Calls 1

TranslateTextMethod · 0.95

Tested by

no test coverage detected