summaryrefslogtreecommitdiff
path: root/repos.helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'repos.helpers.go')
-rw-r--r--repos.helpers.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/repos.helpers.go b/repos.helpers.go
index 3420526..50f3277 100644
--- a/repos.helpers.go
+++ b/repos.helpers.go
@@ -3,8 +3,8 @@ package gitpb
// delete a gopath:
// myrepos.DeleteByPath("go.wit.com/apps/go-clone")
func (all *Repos) DeleteByPath(gopath string) *Repo {
- repolock.Lock()
- defer repolock.Unlock()
+ reposMu.Lock()
+ defer reposMu.Unlock()
for i, _ := range all.Repos {
if all.Repos[i].GoPath == gopath {
@@ -18,8 +18,8 @@ func (all *Repos) DeleteByPath(gopath string) *Repo {
// find a package by gopath
func (all *Repos) FindByGoPath(gopath string) *Repo {
- repolock.RLock()
- defer repolock.RUnlock()
+ reposMu.RLock()
+ defer reposMu.RUnlock()
for _, p := range all.Repos {
if p.GoPath == gopath {
@@ -32,8 +32,8 @@ func (all *Repos) FindByGoPath(gopath string) *Repo {
// enforces no duplicate gopath's
func (all *Repos) add(newP *Repo) bool {
- repolock.Lock()
- defer repolock.Unlock()
+ reposMu.Lock()
+ defer reposMu.Unlock()
for _, p := range all.Repos {
if p.GoPath == newP.GoPath {