Skip to content

Commit

Permalink
header column fix for game results export
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebRose committed Apr 22, 2024
1 parent b2e2828 commit e4ebab4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions managers/ExportManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ func ExportCFBGameResults(w http.ResponseWriter, seasonID, weekID, nflWeekID, ti
close(nflMatchChn)

HeaderRow := []string{
"League", "Week", "Game Title", "Timeslot", "Home Team", "Home Coach", "Home Rank", "Home Score",
"Away Team", "Away Coach", "Away Rank", "Away Score",
"League", "Week", "Home Team", "Home Score",
"Away Team", "Away Score", "Home Coach", "Home Rank", "Away Coach", "Away Rank", "Game Title",
"Neutral Site", "Conference", "Timeslot", "Stadium", "City", "State",
}

Expand All @@ -575,13 +575,12 @@ func ExportCFBGameResults(w http.ResponseWriter, seasonID, weekID, nflWeekID, ti
if m.IsConference {
confStr = "Y"
}
divStr := "N"

row := []string{
"CFB", strconv.Itoa(int(m.Week)), m.GameTitle, m.HomeTeam, m.AwayTeamCoach,
strconv.Itoa(int(m.HomeTeamRank)), strconv.Itoa(int(m.HomeTeamScore)),
m.AwayTeam, m.AwayTeamCoach, strconv.Itoa(int(m.AwayTeamRank)), strconv.Itoa(int(m.AwayTeamScore)),
neutralStr, confStr, divStr, m.TimeSlot, m.Stadium, m.City, m.State,
"CFB", strconv.Itoa(int(m.Week)), m.HomeTeam, strconv.Itoa(int(m.HomeTeamScore)),
m.AwayTeam, strconv.Itoa(int(m.AwayTeamScore)), m.HomeTeamCoach,
strconv.Itoa(int(m.HomeTeamRank)), m.AwayTeamCoach, strconv.Itoa(int(m.AwayTeamRank)), m.GameTitle,
neutralStr, confStr, m.TimeSlot, m.Stadium, m.City, m.State,
}
err = writer.Write(row)
if err != nil {
Expand Down

0 comments on commit e4ebab4

Please sign in to comment.