From 25ab223c07152a41f74b37ff667f6fdd329b2fe6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 13 Jan 2025 05:56:45 -0600 Subject: testing mutex locks and Marshal() function panic --- repo.new.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'repo.new.go') 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 { -- cgit v1.2.3