| 1234567891011121314151617181920212223242526272829 |
- // TODO Implement Bubbletea
- package buggo
- import (
- "fmt"
- tea "github.com/charmbracelet/bubbletea"
- )
- // The main bubbletea Model
- type Model struct {
- Bug Bug
- Path string
- }
- func (m Model) Init() tea.Cmd { return nil }
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
- switch msg.(type) {
- case tea.KeyMsg:
- return m, tea.Quit
- }
- return m, nil
- }
- func (m Model) View() string {
- return fmt.Sprintf("%v", m.Bug)
- }
|