Fix compilation error

This commit is contained in:
Unknwon
2017-02-15 04:09:07 -05:00
parent 3d52ef6e39
commit 94f91543b6
3 changed files with 7 additions and 5 deletions

View File

@@ -113,6 +113,8 @@ func (tes Entries) Sort() {
sort.Sort(tes)
}
var defaultConcurrency = runtime.NumCPU()
type commitInfo struct {
entryName string
infos []interface{}
@@ -136,7 +138,7 @@ func (tes Entries) GetCommitsInfoWithCustomConcurrency(commit *Commit, treePath
}
if maxConcurrency <= 0 {
maxConcurrency = runtime.NumCPU()
maxConcurrency = defaultConcurrency
}
// Length of taskChan determines how many goroutines (subprocesses) can run at the same time.