summaryrefslogtreecommitdiff
path: root/repos.helpers.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-29 16:22:19 -0600
committerJeff Carr <[email protected]>2024-11-29 16:22:19 -0600
commitbdcaba32f89cc635f39300aa213931c8eeffb909 (patch)
treebb4ed9ee2a7ba404d6a03dc48e7c7ddc62e7cdcf /repos.helpers.go
parent3359a4499644a0e59a0dd0f1c2c74ae688f0190a (diff)
autogenpb marshal.pb.go and sort.pb.go
Signed-off-by: Jeff Carr <[email protected]>
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 {