Closed jzelinskie closed 9 years ago
I've inlined the output above the indicated lines.
... // Declared variable `timeout` which goes unused timeout := time.After(processIdleTimeout) for { select { case err := <-notifyChan: if err != nil { return notifyWriter.buf.Bytes(), err } // `timeout` gets covered here timeout = time.After(processIdleTimeout) case <-timeout: if err := cmd.Process.Kill(); err != nil { log.Fatalf("failed to kill hung process: %s", err) } return notifyWriter.buf.Bytes(), errors.New("killed process due to inactivity timeout") case err := <-doneChan: return notifyWriter.buf.Bytes(), err } } }
I've inlined the output above the indicated lines.