Printf prints above the Program. It takes a format template followed by values similar to fmt.Printf. This output is unmanaged by the program and will persist across renders by the Program. Unlike fmt.Printf (but similar to log.Printf) the message will be print on its own line. If the altscreen is
(template string, args ...any)
| 1384 | // |
| 1385 | // If the altscreen is active no output will be printed. |
| 1386 | func (p *Program) Printf(template string, args ...any) { |
| 1387 | p.msgs <- printLineMessage{ |
| 1388 | messageBody: fmt.Sprintf(template, args...), |
| 1389 | } |
| 1390 | } |
| 1391 | |
| 1392 | // startRenderer starts the renderer. |
| 1393 | func (p *Program) startRenderer() { |