// Command sportsball is a terminal dashboard for live sports scores, schedules, // and box scores across the World Cup, MLB, NBA, NHL, and NFL — Plain Text // Sports meets Golazo, in a Bubble Tea TUI. package main import ( "fmt" "os" tea "github.com/charmbracelet/bubbletea" "github.com/humdrum-tiv/sportsball/internal/ui" ) // version is the build version, overwritten at release time via // -ldflags "-X main.version=...". Defaults to "dev" for local builds. var version = "dev" func main() { if wantsVersion(os.Args[1:]) { fmt.Println("sportsball", version) return } p := tea.NewProgram(ui.New(), tea.WithAltScreen()) if _, err := p.Run(); err != nil { fmt.Fprintln(os.Stderr, "sportsball:", err) os.Exit(1) } } // wantsVersion reports whether the args request a version print. func wantsVersion(args []string) bool { for _, a := range args { switch a { case "--version", "-v", "version": return true } } return false }