ing
This commit is contained in:
parent
24c893aaf4
commit
efde760f25
|
@ -10,10 +10,7 @@ func Ping(destination string, options *PingOptions) (*PingResult, error) {
|
||||||
|
|
||||||
params := make([]string, 0)
|
params := make([]string, 0)
|
||||||
params = append(params, "/C")
|
params = append(params, "/C")
|
||||||
params = append(params, "chcp 437 && ping")
|
params = append(params, fmt.Sprintf("chcp 437 && ping %s -n %d -w %d", destination, options.Retry, options.Deadline*1000))
|
||||||
params = append(params, destination)
|
|
||||||
params = append(params, fmt.Sprintf("-n %d", options.Retry))
|
|
||||||
params = append(params, fmt.Sprintf("-w %d", options.Deadline*1000))
|
|
||||||
|
|
||||||
pCmd := exec.Command("cmd.exe", params...)
|
pCmd := exec.Command("cmd.exe", params...)
|
||||||
output, err := pCmd.CombinedOutput()
|
output, err := pCmd.CombinedOutput()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user