From d7556c9f77e501d7fb0032e6b08c6b1cfc5cf343 Mon Sep 17 00:00:00 2001 From: sairson Date: Sun, 9 Jan 2022 11:06:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=8C=E5=92=8C=E6=9B=B4=E6=94=B9ants=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF=E5=BE=97?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E9=80=9F=E5=BA=A6=E7=A8=B3=E5=AE=9A=E4=B8=94?= =?UTF-8?q?=E8=AF=AF=E6=8A=A5=E5=87=8F=E5=B0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/icmp.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/icmp.go b/cmd/icmp.go index d6bc446..a18c569 100644 --- a/cmd/icmp.go +++ b/cmd/icmp.go @@ -77,6 +77,8 @@ func ping(ip string) bool { cmd = exec.Command("/bin/bash", "-c", "ping -c 1 -w 1 "+ip+" >/dev/null && echo true || echo false") case "darwin": cmd = exec.Command("/bin/bash", "-c", "ping -c 1 -w 1 "+ip+" >/dev/null && echo true || echo false") + default: + cmd = exec.Command("/bin/bash", "-c", "ping -c 1 -w 1 "+ip+" >/dev/null && echo true || echo false") } info := bytes.Buffer{} cmd.Stdout = &info