output to help figure out what to do when this happens

This commit is contained in:
Jeff Carr 2024-12-15 08:48:42 -06:00
parent 5341a70557
commit 5c1bebb16c
2 changed files with 3 additions and 6 deletions

View File

@ -15,12 +15,6 @@ vet:
goimports: goimports:
goimports -w *.go goimports -w *.go
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
go mod edit -go=1.20
clean: clean:
rm -f *.pb.go rm -f *.pb.go
-rm -f go.* -rm -f go.*

View File

@ -18,6 +18,9 @@ func (all *Repos) NewGoPath(basepath string, gopath string, url string) (*Repo,
return nil, errors.New("blank gopath") return nil, errors.New("blank gopath")
} }
if r := all.FindByGoPath(gopath); r != nil { if r := all.FindByGoPath(gopath); r != nil {
log.Info("gitpb.NewGoPath() already has gopath", r.GoPath)
log.Info("gitpb.NewGoPath() already has FullPath", r.FullPath)
log.Info("gitpb.NewGoPath() already has URL", r.URL)
// already had this gopath // already had this gopath
return r, errors.New("gitpb.NewGoPath() duplicate gopath " + gopath) return r, errors.New("gitpb.NewGoPath() duplicate gopath " + gopath)
} }