Browse Source

Remove unnecessary select statement (#692)

* Remove unnecessary select statement

* Remove unnecessary if-statement
pull/707/head
Pontus Leitzler 7 years ago committed by Ben Kochie
parent
commit
0b6763886a
  1. 7
      node_exporter_test.go

7
node_exporter_test.go

@ -129,14 +129,9 @@ func runCommandAndTests(cmd *exec.Cmd, address string, fn func(pid int) error) e
errc <- fn(pid)
}(cmd.Process.Pid)
select {
case err := <-errc:
err := <-errc
if cmd.Process != nil {
cmd.Process.Kill()
}
if err != nil {
return err
}
}
return nil
}

Loading…
Cancel
Save