issues.go 681 B

12345678910111213141516171819202122232425262728293031323334
  1. // TODO implement create/edit/delete funcs
  2. //
  3. // TODO implement attempt to auto load issues folder if no arg specified
  4. package main
  5. import (
  6. "flag"
  7. "fmt"
  8. "issues"
  9. "os"
  10. tea "github.com/charmbracelet/bubbletea"
  11. )
  12. func main() {
  13. flag.Parse()
  14. arg := flag.Args()
  15. if len(arg) == 0 {
  16. fmt.Println("Not enough args:", arg)
  17. os.Exit(1)
  18. }
  19. p := tea.NewProgram(
  20. issues.Model{Path: arg[0]},
  21. tea.WithAltScreen(), // use the full size of the terminal in its "alternate screen buffer"
  22. // tea.WithMouseCellMotion(), // turn on mouse support so we can track the mouse wheel
  23. )
  24. if _, err := p.Run(); err != nil {
  25. fmt.Println("could not run program:", err)
  26. os.Exit(1)
  27. }
  28. }