-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: mod -init does not accept a module path without a dot #26510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ideally package import paths without a dot should work fine (it's not required by the spec). I was just unable to use a
Manually editing the I think non-dot top level paths should continue to be properly supported by the tooling. Many people have been using top level non-dot directories in their private GOPATH repos over the years. Ideally anyone in this situation should be able to use modules for the improved dependency management. Some orgs may even support |
@radutopala Looks like the initial issue has been solved. Perhaps I should move the larger problem with tooling supporting import paths without dots to another issue? |
@mpx I'll check soon, thx |
Yes, please file that separately. Just to be clear, it is unlikely that we will support module paths without dots: dotless import paths are in general reserved for the standard library. (Modules intentionally use URI paths to avoid collisions.) |
Thanks, closing out this issue. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
I'm outside of the GOPATH.
What did you expect to see?
go.mod
created withWhat did you see instead?
We should be allowed to set a module name as "application" or whatever string, and not being restricted to "github.com/radutopala/application" or "domain.ext/package".
The text was updated successfully, but these errors were encountered: