Ping test get output
This commit is contained in:
parent
b0bca2eec6
commit
05c1202ca9
13
cmd/ping/main.go
Normal file
13
cmd/ping/main.go
Normal 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)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user