diff options
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 |
