init porkbacon tui project

This commit is contained in:
juancwu 2026-01-21 17:01:41 +00:00
commit 55be985ca7
5 changed files with 127 additions and 0 deletions

31
internal/app/app.go Normal file
View file

@ -0,0 +1,31 @@
package app
import (
tea "github.com/charmbracelet/bubbletea"
)
type App struct {
}
func New() App {
return App{}
}
func (a App) Init() tea.Cmd {
return nil
}
func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
switch msg.String() {
case "ctrl+c", "q":
return a, tea.Quit
}
}
return a, nil
}
func (a App) View() string {
return "porkbacon app"
}