From efde760f2539585a7547d6166a4177e303169bfa Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 17 Sep 2018 20:24:02 +0900 Subject: [PATCH] ing --- net/ping/ping_windows.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/ping/ping_windows.go b/net/ping/ping_windows.go index dcf04c9..6f8e605 100644 --- a/net/ping/ping_windows.go +++ b/net/ping/ping_windows.go @@ -10,10 +10,7 @@ func Ping(destination string, options *PingOptions) (*PingResult, error) { params := make([]string, 0) params = append(params, "/C") - params = append(params, "chcp 437 && ping") - params = append(params, destination) - params = append(params, fmt.Sprintf("-n %d", options.Retry)) - params = append(params, fmt.Sprintf("-w %d", options.Deadline*1000)) + params = append(params, fmt.Sprintf("chcp 437 && ping %s -n %d -w %d", destination, options.Retry, options.Deadline*1000)) pCmd := exec.Command("cmd.exe", params...) output, err := pCmd.CombinedOutput()