diff options
| author | Jeff Carr <[email protected]> | 2025-01-19 02:37:58 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-19 02:37:58 -0600 |
| commit | b0595d6a1d7747bfe10b18be7d2c93c8f120f678 (patch) | |
| tree | 72d30b115389c6f6f54b4f6495034424a23e0a4a /repo.new.go | |
| parent | 84c9fe2bfcb7937246b21e4aff2984ae2fe18e95 (diff) | |
remove every mutex change since Marshal() was crashing
Diffstat (limited to 'repo.new.go')
| -rw-r--r-- | repo.new.go | 9 |
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) |
