fix bugs related to vendoring
This commit is contained in:
parent
1ab2dee3bf
commit
e69fc18966
1 changed files with 11 additions and 8 deletions
19
main.go
19
main.go
|
|
@ -91,14 +91,17 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if players == nil || len(*players) == 0 {
|
if players == nil || len(*players) == 0 {
|
||||||
fmt.Println("No players online.")
|
fmt.Println("No players online.")
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("Players online:\n")
|
maxIndex := byte(0)
|
||||||
for _, p := range *players {
|
for _, p := range *players {
|
||||||
fmt.Printf(" - Name: %s, Score: %d, Duration: %s\n", p.Name, p.Score, p.Duration)
|
if p.Index > maxIndex {
|
||||||
}
|
maxIndex = p.Index
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
fmt.Printf("Highest player index: %d\n", maxIndex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func versionCompare(a, b string) int {
|
func versionCompare(a, b string) int {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue