PingAndList can ping now but not just list

This commit is contained in:
JunDao
2019-05-12 11:10:00 +08:00
parent 71e4d24465
commit 4dee74b119
2 changed files with 34 additions and 11 deletions

View File

@ -6,9 +6,9 @@ import (
)
func main() {
resp, err := bot.PingAndList("play.miaoscraft.cn", 25565)
resp, delay, err := bot.PingAndList("play.miaoscraft.cn", 25565)
if err != nil {
log.Fatalf("ping and list server fail: %v", err)
}
log.Println("Status:" + resp)
log.Println("Status:"+string(resp), "\nDealy:", delay)
}