网络
已收录文章:1篇
-
如下所示: package main import ( "fmt" "os/exec" "time" ) func NetWorkStatus() bool { cmd := exec.Command("ping", "baidu.com", "-c", "1", "-W", "5") fmt.Println("NetWorkStatus Start:", time.Now().Unix()) err := cmd.Run() fmt.Println("NetWo132 收藏