mirror of
https://github.com/taigrr/gico.git
synced 2026-04-02 03:09:07 -07:00
fix an error where the wait group never completes on uninitialized repo
This commit is contained in:
@@ -24,6 +24,7 @@ func (paths RepoSet) FrequencyChan(year int, authors []string) (types.Freq, erro
|
||||
for _, p := range paths {
|
||||
wg.Add(1)
|
||||
go func(path string) {
|
||||
defer wg.Done()
|
||||
repo, err := OpenRepo(path)
|
||||
if err != nil {
|
||||
return
|
||||
@@ -40,7 +41,6 @@ func (paths RepoSet) FrequencyChan(year int, authors []string) (types.Freq, erro
|
||||
for c := range cc {
|
||||
outChan <- c
|
||||
}
|
||||
wg.Done()
|
||||
}(p)
|
||||
}
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user