func doPrepareSyncURLs(sourceURL string, targetURLs []string, bar barSend, lock countlock.Locker) { for sURLs := range prepareSyncURLs(sourceURL, targetURLs) { if sURLs.Error != nil { // no need to print errors here, any error here // will be printed later during Sync() continue } if !globalQuietFlag { bar.Extend(sURLs.SourceContent.Size) lock.Up() // Let copy routine know that it has to catch up. } } }