Initial commit
This commit is contained in:
42
main.go
Normal file
42
main.go
Normal file
@ -0,0 +1,42 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"tasksquire/common"
|
||||
"tasksquire/model"
|
||||
"tasksquire/taskwarrior"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ts := taskwarrior.NewTaskSquire("./test/taskrc")
|
||||
ctx := context.Background()
|
||||
common := common.NewCommon(ctx, ts)
|
||||
|
||||
// form := huh.NewForm(
|
||||
// huh.NewGroup(
|
||||
// huh.NewSelect[string]().
|
||||
// Options(huh.NewOptions(config.Reports...)...).
|
||||
// Title("Report").
|
||||
// Description("Choose the report to display").
|
||||
// Value(&report),
|
||||
// ),
|
||||
// )
|
||||
|
||||
// err = form.Run()
|
||||
// if err != nil {
|
||||
// slog.Error("Uh oh:", err)
|
||||
// os.Exit(1)
|
||||
// }
|
||||
m := model.NewMainModel(common)
|
||||
|
||||
if _, err := tea.NewProgram(m, tea.WithAltScreen()).Run(); err != nil {
|
||||
fmt.Println("Error running program:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user