2021-08-07 01:24:56 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-11-03 01:30:15 +00:00
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
|
|
"github.com/maaslalani/confetty/confetti"
|
|
|
|
"github.com/maaslalani/confetty/fireworks"
|
2021-08-07 01:24:56 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2021-11-03 01:30:15 +00:00
|
|
|
var err error
|
2021-11-03 01:38:04 +00:00
|
|
|
var model tea.Model
|
2021-11-03 01:30:15 +00:00
|
|
|
if len(os.Args) > 1 && os.Args[1] == "fireworks" {
|
2021-11-03 01:38:04 +00:00
|
|
|
model = fireworks.InitialModel()
|
2021-11-03 01:30:15 +00:00
|
|
|
} else {
|
2021-11-03 01:38:04 +00:00
|
|
|
model = confetti.InitialModel()
|
2021-11-03 01:30:15 +00:00
|
|
|
}
|
2021-11-03 01:38:04 +00:00
|
|
|
p := tea.NewProgram(model, tea.WithAltScreen())
|
|
|
|
err = p.Start()
|
2021-11-03 01:30:15 +00:00
|
|
|
if err != nil {
|
|
|
|
fmt.Fprintln(os.Stderr, err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
2021-08-07 01:24:56 +00:00
|
|
|
}
|