aboutsummaryrefslogtreecommitdiffstats
path: root/para.go
diff options
context:
space:
mode:
Diffstat (limited to 'para.go')
-rw-r--r--para.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/para.go b/para.go
index 9ef4a11..9948866 100644
--- a/para.go
+++ b/para.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package main
+package kati
import (
"bufio"
@@ -20,7 +20,6 @@ import (
"fmt"
"io"
"os/exec"
- "path/filepath"
)
func btoi(b bool) int {
@@ -133,9 +132,8 @@ type ParaWorker struct {
doneChan chan bool
}
-func NewParaWorker(paraChan chan *ParaResult) *ParaWorker {
- bin := filepath.Join(katiDir, "para")
- para := exec.Command(bin, fmt.Sprintf("-j%d", jobsFlag), "--kati")
+func newParaWorker(paraChan chan *ParaResult, numJobs int, paraPath string) *ParaWorker {
+ para := exec.Command(paraPath, fmt.Sprintf("-j%d", numJobs), "--kati")
stdin, err := para.StdinPipe()
if err != nil {
panic(err)