Fix all ranks being set to zero.
parent
c8de797166
commit
202cae1b28
7
main.go
7
main.go
|
@ -588,17 +588,20 @@ func main() {
|
||||||
goalDiffPrefix = ""
|
goalDiffPrefix = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK - get team name from two diff fields
|
// HACK - get team name and rank from two diff fields
|
||||||
var teamName string
|
var teamName string
|
||||||
|
var rank uint8
|
||||||
switch v := standing.(type) {
|
switch v := standing.(type) {
|
||||||
case footballdata.TeamLeagueStatisticsInStanding:
|
case footballdata.TeamLeagueStatisticsInStanding:
|
||||||
teamName = v.TeamName
|
teamName = v.TeamName
|
||||||
|
rank = v.Position
|
||||||
case footballdata.TeamLeagueStatisticsInStandings:
|
case footballdata.TeamLeagueStatisticsInStandings:
|
||||||
teamName = v.Team
|
teamName = v.Team
|
||||||
|
rank = v.Rank
|
||||||
}
|
}
|
||||||
|
|
||||||
data = append(data, []string{
|
data = append(data, []string{
|
||||||
fmt.Sprintf("%d", actualStanding.Position),
|
fmt.Sprintf("%d", rank),
|
||||||
teamName,
|
teamName,
|
||||||
fmt.Sprintf("%d", actualStanding.PlayedGames),
|
fmt.Sprintf("%d", actualStanding.PlayedGames),
|
||||||
fmt.Sprintf("%d:%d", actualStanding.Goals, actualStanding.GoalsAgainst),
|
fmt.Sprintf("%d:%d", actualStanding.Goals, actualStanding.GoalsAgainst),
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 76a795f444e4ad1f8936520fc750402e7c985e2a
|
Subproject commit eff192f192a55fb76a2711ff8e4e44015e5f5e58
|
Loading…
Reference in New Issue