Files
2026-08-09 18:06:06 +02:00

30 lines
476 B
Go

package main
import (
"fmt"
"os"
tui "github.com/grindlemire/go-tui"
)
func main() {
eventCh := make(chan string, 100)
app, err := tui.NewApp(
tui.WithRootComponent(Dashboard(eventCh)),
tui.WithMouse(),
)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to create app: %v\n", err)
os.Exit(1)
}
defer app.Close()
go produceEvents(eventCh, app.StopCh())
if err := app.Run(); err != nil {
fmt.Fprintf(os.Stderr, "App error: %v\n", err)
os.Exit(1)
}
}