From 491b79c179cee19bff1293a9dda09478c5978613 Mon Sep 17 00:00:00 2001 From: sre Date: Mon, 20 Jun 2022 18:43:46 +0800 Subject: [PATCH] use color red adjust 50ms timeout --- goping/goping.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goping/goping.go b/goping/goping.go index d93b5c8..10593aa 100644 --- a/goping/goping.go +++ b/goping/goping.go @@ -175,7 +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() fmt.Printf("\n--- %s ping statistics ---\n", address) - fmt.Printf("%d packets transmitted, %f lost, %.2f%% packet loss, time 1000ms\n", icmp_seq, red(dropPack), dropPack/float64(icmp_seq)*100) + fmt.Printf("%d packets transmitted, %f %s, %.2f%% packet loss, time 1000ms\n", icmp_seq, dropPack, red("lost"), dropPack/float64(icmp_seq)*100) if len(ret_list) == 0 { avg_lan = 3000.0 } else {