diff options
| author | Jeff Carr <[email protected]> | 2025-08-31 13:28:40 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-31 13:28:40 -0500 |
| commit | 46d61345afa0cd87567bc0293cd3413b54e3c677 (patch) | |
| tree | 1f370863ddeb4e391c680601982f91519ba35d29 /repo.new.go | |
| parent | 434f62a7e6ffd6d16230ba920393c82c487633ae (diff) | |
go back to global mutex again. hmmm.
Diffstat (limited to 'repo.new.go')
| -rw-r--r-- | repo.new.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/repo.new.go b/repo.new.go index de8a058..453fa0a 100644 --- a/repo.new.go +++ b/repo.new.go @@ -35,6 +35,7 @@ func (all *Repos) NewGoRepo(fullpath string, gopath string) (*Repo, error) { // everything happens in here newr.Reload() + newr.ValidateUTF8() if all.AppendByFullPath(&newr) { // worked return &newr, nil @@ -52,6 +53,7 @@ func (all *Repos) NewGoRepo(fullpath string, gopath string) (*Repo, error) { // enforces GoPath is unique // TODO: deprecate this (?) // mutex's should finally work in the autogenpb protobuf code +/* func (all *Repos) AppendByGoPathOld(newr *Repo) bool { // all.RLock() repoMu.RLock() @@ -69,6 +71,7 @@ func (all *Repos) AppendByGoPathOld(newr *Repo) bool { all.Append(newr) return true } +*/ func (all *Repos) NewRepo(fullpath string, namespace string) (*Repo, error) { if r := all.FindByFullPath(fullpath); r != nil { @@ -88,6 +91,7 @@ func (all *Repos) NewRepo(fullpath string, namespace string) (*Repo, error) { // everything happens in here newr.Reload() + newr.ValidateUTF8() if all.AppendByFullPath(&newr) { // worked return &newr, nil |
