We have a go mod redirect service that sits in front of our various VCS repos so we can have our go mods all belong to the same module parent and the location in the VCS group structure doesn't dictate the location in our go mod tree. For example go.our-company.com/core/http refers to a location in Gitlab's group structure like gitlab.ourcompany.com/services/core/lib/http-go.
This causes the vcs.RepoRootForImportPath method to return an error because it attempts to use the VCS name, which isn't resolvable. Would you be open to a PR that uses the module name as specified in the go.mod file if a flag (e.g. --use-go-mod-name) is specified?
We have a go mod redirect service that sits in front of our various VCS repos so we can have our go mods all belong to the same module parent and the location in the VCS group structure doesn't dictate the location in our go mod tree. For example
go.our-company.com/core/http
refers to a location in Gitlab's group structure likegitlab.ourcompany.com/services/core/lib/http-go
.This causes the
vcs.RepoRootForImportPath
method to return an error because it attempts to use the VCS name, which isn't resolvable. Would you be open to a PR that uses the module name as specified in thego.mod
file if a flag (e.g.--use-go-mod-name
) is specified?