From 68b32680549bd3135e7059cc7ecbe7dd63ff77e3 Mon Sep 17 00:00:00 2001 From: filifa Date: Sun, 28 Jul 2024 22:47:11 -0500 Subject: [PATCH] simplify setting teamId --- cmd/schedule.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/schedule.go b/cmd/schedule.go index 2adcd65..7d75205 100644 --- a/cmd/schedule.go +++ b/cmd/schedule.go @@ -30,10 +30,8 @@ var team teamFlag var sport = sportFlag("mlb") func schedule(cmd *cobra.Command, args []string) { - var teamId string - if team == "" { - teamId = string(team) - } else { + teamId := "" + if team != "" { teamId = strconv.Itoa(int(teamIDs[string(team)])) }