wp Done bug fixed

This commit is contained in:
Zoker 2020-06-13 16:31:02 +08:00
parent 59c77e7571
commit aa91ff5951
1 changed files with 1 additions and 1 deletions

View File

@ -155,11 +155,11 @@ func getRepoLocal(repos []string) (reposLocal []RepoLocal) {
func getRepoItemWorker(paths <- chan string, wp *sync.WaitGroup, reposLocal *[]RepoLocal, mutex *sync.Mutex) {
for path := range paths {
defer wp.Done()
size, outAlert, _ := repoSize(path)
mutex.Lock()
*reposLocal = append(*reposLocal, RepoLocal{path: path, sizeM: size, alert: outAlert})
mutex.Unlock()
wp.Done()
}
}