Better message if nobody's playing

This commit is contained in:
Neale Pickett 2014-12-27 23:55:03 +00:00
parent d74b7e1415
commit d3c6c63dd9
1 changed files with 5 additions and 0 deletions

View File

@ -74,9 +74,14 @@ func main() {
fmt.Println("<body>") fmt.Println("<body>")
fmt.Println("<h1>Are The Picketts playing Minecraft PE?</h1>") fmt.Println("<h1>Are The Picketts playing Minecraft PE?</h1>")
fmt.Println("<ul id=\"a\">") fmt.Println("<ul id=\"a\">")
count := 0
for msg := range results { for msg := range results {
fmt.Printf("<li>%s</li>\n", msg) fmt.Printf("<li>%s</li>\n", msg)
count += 1
} }
fmt.Println("</ul>") fmt.Println("</ul>")
if count == 0 {
fmt.Println("<p>Sorry, looks like nobody's playing right now.</p>")
}
fmt.Println("</body></html>") fmt.Println("</body></html>")
} }