set default sport differently
This commit is contained in:
parent
095cd4a0b4
commit
e1e0225612
|
@ -27,7 +27,7 @@ import (
|
|||
|
||||
var date string
|
||||
var team teamFlag
|
||||
var sport sportFlag
|
||||
var sport = sportFlag("mlb")
|
||||
|
||||
func schedule(cmd *cobra.Command, args []string) {
|
||||
var teamId string
|
||||
|
@ -37,12 +37,7 @@ func schedule(cmd *cobra.Command, args []string) {
|
|||
teamId = strconv.Itoa(int(teamIDs[string(team)]))
|
||||
}
|
||||
|
||||
var sportId string
|
||||
if sport == "" {
|
||||
sportId = strconv.Itoa(int(statsapi.MLB))
|
||||
} else {
|
||||
sportId = strconv.Itoa(int(sportIDs[string(sport)]))
|
||||
}
|
||||
sportId := strconv.Itoa(int(sportIDs[string(sport)]))
|
||||
|
||||
sched, err := statsapi.RequestSchedule(sportId, teamId, date)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue