From 849d253120338796f6894c1dd87bcb1e5df0edc7 Mon Sep 17 00:00:00 2001 From: sre Date: Mon, 20 Jun 2022 19:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AAseq?= =?UTF-8?q?=E6=B2=A1=E7=BB=9F=E8=AE=A1=E8=BF=87=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- goping/goping.go | 1 + 1 file changed, 1 insertion(+) diff --git a/goping/goping.go b/goping/goping.go index bc843dc..dbd947f 100644 --- a/goping/goping.go +++ b/goping/goping.go @@ -175,6 +175,7 @@ func Ping(domain string, PS int) { func foot(address string, icmp_seq int, dropPack, min_lan, avg_lan, max_lan float64, ret_list []float64) { red := color.New(color.FgRed).SprintFunc() green := color.New(color.FgGreen).SprintFunc() + icmp_seq -= 1 //最后一个seq没统计过来 fmt.Printf("\n--- %s ping statistics ---\n", address) if dropPack >= 1 { fmt.Printf("%d packets transmitted, %f %s, %.2f%% packet loss, time 1000ms\n", icmp_seq, dropPack, red("lost"), dropPack/float64(icmp_seq)*100)