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: embed from parent directory #71526

Closed
DragonWork opened this issue Feb 1, 2025 · 4 comments
Closed

proposal: embed from parent directory #71526

DragonWork opened this issue Feb 1, 2025 · 4 comments
Labels
LanguageProposal Issues describing a requested change to the Go language specification. Proposal
Milestone

Comments

@DragonWork
Copy link

Proposal Details

In reference to the closed #58519

This is still relevant, considering the Standard Go Project Layout, where the projects root (called . hereafter) contains several folders and the source code is usually in a subfolder (cmd, pkg, internal, tools) and assets in sibling directories (assets, configs, init, docs, ./LICENSE, ./README, …).

Please don‘t come up with hacks like an embedding script in ., this defeats the purpose of the Standard Layout.

@gopherbot gopherbot added this to the Proposal milestone Feb 1, 2025
@dominikh
Copy link
Member

dominikh commented Feb 1, 2025

The "Standard Go Project Layout" is not an official standard nor is its use suggested by Go. Its shortcomings don't imply shortcomings in Go.

This issue doesn't constitute an actual proposal; it doesn't propose how to make such a change in a way that's compatible with existing requirements. It doesn't contribute anything new over #58519 (nor #58525). That makes this issue unactionable.

@dominikh dominikh closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2025
@adonovan
Copy link
Member

adonovan commented Feb 1, 2025

This is still relevant, considering the Standard Go Project Layout[...] Please don‘t come up with hacks like an embedding script in ., this defeats the purpose of the Standard Layout.

Do be aware that the so-called "Standard Go Project Layout" is anything but a standard; you should take it with a hefty punch of salt when citing it as a motivation.

@DragonWork
Copy link
Author

DragonWork commented Feb 1, 2025

The official Go Docs do recommend a similar layout.

The current go:embed limitation does indeed collide with the layout recommendation (section Server project): https://go.dev/doc/modules/layout

My proposal referred to another, which was closed prematurely. You don‘t have to reinvent the wheel…

@gabyhelp
Copy link

gabyhelp commented Feb 1, 2025

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gabyhelp gabyhelp added the LanguageProposal Issues describing a requested change to the Go language specification. label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LanguageProposal Issues describing a requested change to the Go language specification. Proposal
Projects
None yet
Development

No branches or pull requests

5 participants