gspot/src/components/tui/tui.go
abs3nt affb5fbaba
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed
refac
2024-02-18 18:51:25 -08:00

21 lines
425 B
Go

package tui
import (
tea "github.com/charmbracelet/bubbletea"
"git.asdf.cafe/abs3nt/gspot/src/components/commands"
)
// StartTea the entry point for the UI. Initializes the model.
func StartTea(cmd *commands.Commander, mode string) error {
m, err := InitMain(cmd, Mode(mode))
if err != nil {
return err
}
P = tea.NewProgram(m, tea.WithAltScreen())
if _, err := P.Run(); err != nil {
return err
}
return nil
}