This commit is contained in:
crusader 2018-09-17 20:29:40 +09:00
parent 1a3a18f2b2
commit 79fc4eaac4

View File

@ -62,7 +62,6 @@ func parseLinuxPing(output []byte) (*PingResult, error) {
LOOP: LOOP:
for _, line := range lines { for _, line := range lines {
log.Print(line)
fields := strings.Fields(line) fields := strings.Fields(line)
switch len(fields) { switch len(fields) {
case 5: case 5:
@ -184,11 +183,9 @@ func parseWindowsPing(output []byte) (*PingResult, error) {
seq := 1 seq := 1
LOOP: LOOP:
for _, line := range lines { for _, line := range lines {
log.Print(line)
fields := strings.Fields(line) fields := strings.Fields(line)
switch len(fields) { switch len(fields) {
case 3: case 3:
log.Print(fields)
if "Request timed out." != line { if "Request timed out." != line {
continue LOOP continue LOOP
} }
@ -222,7 +219,6 @@ LOOP:
} }
seq = seq + 1 seq = seq + 1
case 9: case 9:
log.Print(fields)
if "Minimum" != fields[0] { if "Minimum" != fields[0] {
continue LOOP continue LOOP
} }
@ -305,7 +301,6 @@ func parseDarwinPing(output []byte) (*PingResult, error) {
LOOP: LOOP:
for _, line := range lines { for _, line := range lines {
log.Print(line)
fields := strings.Fields(line) fields := strings.Fields(line)
switch len(fields) { switch len(fields) {
case 5: case 5: