summaryrefslogtreecommitdiff
path: root/repo.new.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-13 05:56:45 -0600
committerJeff Carr <[email protected]>2025-01-13 05:56:45 -0600
commit25ab223c07152a41f74b37ff667f6fdd329b2fe6 (patch)
treee41c1ba016b12354d072f56149625f9512e2fbac /repo.new.go
parent208118ad5f78ce6e15da00753df491cfed771ce8 (diff)
testing mutex locks and Marshal() function panic
Diffstat (limited to 'repo.new.go')
-rw-r--r--repo.new.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/repo.new.go b/repo.new.go
index fa39dfa..c073fad 100644
--- a/repo.new.go
+++ b/repo.new.go
@@ -50,8 +50,8 @@ func (all *Repos) NewGoRepo(fullpath string, gopath string) (*Repo, error) {
// enforces GoPath is unique
func (all *Repos) AppendByGoPath(newr *Repo) bool {
- all.Lock.RLock()
- defer all.Lock.RUnlock()
+ all.RLock()
+ defer all.RUnlock()
for _, r := range all.Repos {
if r.GoInfo.GoPath == newr.GoInfo.GoPath {