main.go 873 B

12345678910111213141516171819202122232425262728293031323334
  1. // TODO implement cli argv defs
  2. //
  3. // TODO implement interface for browse bugs in folder
  4. //
  5. // For example:
  6. // If the user provides the path of a folder that matches spec for a bug,
  7. // just display that bug. Otherwise treat the specified path as a collection
  8. // of bugs.
  9. //
  10. // See Also:
  11. // - charmbracelet/bubbles directory and tree explorer
  12. package main
  13. import (
  14. "buggo"
  15. "fmt"
  16. "os"
  17. tea "github.com/charmbracelet/bubbletea"
  18. )
  19. func main() {
  20. bug, _ := buggo.Bug.NewFromPath(buggo.Bug{}, "tests/bugs/test-1") // TODO set via argv
  21. p := tea.NewProgram(
  22. buggo.Model{Bug: bug},
  23. tea.WithAltScreen(), // use the full size of the terminal in its "alternate screen buffer"
  24. // tea.WithMouseCellMotion(), // turn on mouse support so we can track the mouse wheel
  25. )
  26. if _, err := p.Run(); err != nil {
  27. fmt.Println("could not run program:", err)
  28. os.Exit(1)
  29. }
  30. }