From b0595d6a1d7747bfe10b18be7d2c93c8f120f678 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 19 Jan 2025 02:37:58 -0600 Subject: remove every mutex change since Marshal() was crashing --- repo.new.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'repo.new.go') 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) -- cgit v1.2.3