Run starts the TUI application. output specifies where bubbletea renders. If nil, defaults to os.Stdout.
(port int, secretKey string, hook *LogHook, output io.Writer)
| 486 | // Run starts the TUI application. |
| 487 | // output specifies where bubbletea renders. If nil, defaults to os.Stdout. |
| 488 | func Run(port int, secretKey string, hook *LogHook, output io.Writer) error { |
| 489 | if output == nil { |
| 490 | output = os.Stdout |
| 491 | } |
| 492 | app := NewApp(port, secretKey, hook) |
| 493 | p := tea.NewProgram(app, tea.WithAltScreen(), tea.WithOutput(output)) |
| 494 | _, err := p.Run() |
| 495 | return err |
| 496 | } |
| 497 | |
| 498 | func (a App) broadcastToAllTabs(msg tea.Msg) (tea.Model, tea.Cmd) { |
| 499 | var cmds []tea.Cmd |