From 202cae1b28923ec8e9b1d39c68f44ea9e53037f8 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Sat, 16 Jun 2018 23:18:26 +0200 Subject: [PATCH] Fix all ranks being set to zero. --- main.go | 7 +++++-- vendor/github.com/icedream/go-footballdata | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index c24570c..1dc3f1b 100644 --- a/main.go +++ b/main.go @@ -588,17 +588,20 @@ func main() { goalDiffPrefix = "" } - // HACK - get team name from two diff fields + // HACK - get team name and rank from two diff fields var teamName string + var rank uint8 switch v := standing.(type) { case footballdata.TeamLeagueStatisticsInStanding: teamName = v.TeamName + rank = v.Position case footballdata.TeamLeagueStatisticsInStandings: teamName = v.Team + rank = v.Rank } data = append(data, []string{ - fmt.Sprintf("%d", actualStanding.Position), + fmt.Sprintf("%d", rank), teamName, fmt.Sprintf("%d", actualStanding.PlayedGames), fmt.Sprintf("%d:%d", actualStanding.Goals, actualStanding.GoalsAgainst), diff --git a/vendor/github.com/icedream/go-footballdata b/vendor/github.com/icedream/go-footballdata index 76a795f..eff192f 160000 --- a/vendor/github.com/icedream/go-footballdata +++ b/vendor/github.com/icedream/go-footballdata @@ -1 +1 @@ -Subproject commit 76a795f444e4ad1f8936520fc750402e7c985e2a +Subproject commit eff192f192a55fb76a2711ff8e4e44015e5f5e58