Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

inferring module name fails when module name isn't the VCS name #264

Open
justinrush opened this issue Apr 26, 2023 · 0 comments
Open

inferring module name fails when module name isn't the VCS name #264

justinrush opened this issue Apr 26, 2023 · 0 comments

Comments

@justinrush
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant