mirror of
https://github.com/maaslalani/confetty.git
synced 2024-11-14 19:56:43 +00:00
26 lines
502 B
Go
26 lines
502 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
"github.com/maaslalani/confetty/confetti"
|
|
"github.com/maaslalani/confetty/fireworks"
|
|
)
|
|
|
|
func main() {
|
|
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)
|
|
}
|
|
}
|