Skip to content
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

proposal: elide "src" in module import paths #59546

Closed
mcandre opened this issue Apr 11, 2023 · 1 comment
Closed

proposal: elide "src" in module import paths #59546

mcandre opened this issue Apr 11, 2023 · 1 comment

Comments

@mcandre
Copy link

mcandre commented Apr 11, 2023

I would like to be able to nest assorted .go files in a "src" directory, which may not constitute separate logical sub-modules, without having to add "src", nor aliases, to the resulting import paths.

I tend to use a lot of top-level non-go files, such as linter configurations. My .go files are interleaved with these, which makes project navigation more difficult for new project ontributors.

Some of my .go files could reasonably be bundled into a common sub-module. But Not all of them.

I prefer a universal, repeatable project structure. For example, I nest my importable Rust code in a "src" subdirectory. I nest my importable Java code in "a src/..." subdirectory. I nest my importable shell code in a "lib" directory. I would love for the go module system to allow for similar subdirectory elision in import paths.

@gopherbot gopherbot added this to the Proposal milestone Apr 11, 2023
@seankhliao
Copy link
Member

Duplicate of #34055

@seankhliao seankhliao marked this as a duplicate of #34055 Apr 11, 2023
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2023
@golang golang locked and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants