| 123456789101112131415161718192021222324252627282930313233343536 |
- // TODO Implement Bubbletea
- // TODO Replace bug.go implementation of [Bug.View]
- 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 {
- var output string
- output = output + fmt.Sprintf("%v", m.Bug)
- // title
- // status
- // variadics
- // description
- return output
- }
|