confetty/main.go

26 lines
502 B
Go
Raw Normal View History

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
if len(os.Args) > 1 && os.Args[1] == "fireworks" {
p := tea.NewProgram(fireworks.InitialModel(), tea.WithAltScreen())
err = p.Start()
} else {
p := tea.NewProgram(confetti.InitialModel(), tea.WithAltScreen())
err = p.Start()
}
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
2021-08-07 01:24:56 +00:00
}