summaryrefslogtreecommitdiff
path: root/repo.new.go
diff options
context:
space:
mode:
Diffstat (limited to 'repo.new.go')
-rw-r--r--repo.new.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/repo.new.go b/repo.new.go
index 39dd303..27b21f9 100644
--- a/repo.new.go
+++ b/repo.new.go
@@ -50,15 +50,18 @@ func (all *Repos) NewGoRepo(fullpath string, gopath string) (*Repo, error) {
// enforces GoPath is unique
func (all *Repos) AppendByGoPath(newr *Repo) bool {
- all.RLock()
+ // all.RLock()
+ repoMu.RLock()
for _, r := range all.Repos {
if r.GoInfo.GoPath == newr.GoInfo.GoPath {
- all.RUnlock()
+ // all.RUnlock()
+ repoMu.RUnlock()
return false
}
}
- all.RUnlock()
+ // all.RUnlock()
+ repoMu.RUnlock()
// all.Repos = append(all.Repos, newr)
all.Append(newr)