Ping test get output

This commit is contained in:
奶爸 2019-11-09 12:13:38 +08:00
parent b0bca2eec6
commit 05c1202ca9

13
cmd/ping/main.go Normal file
View File

@ -0,0 +1,13 @@
package main
import (
"log"
"os/exec"
)
func main() {
cmd := exec.Command("ping", "qiongbi.net", "-c5")
output, err := cmd.Output()
log.Println("output:", string(output))
log.Println("err:", err)
}