Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unnest template/examples #2031

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

Closed
Tracked by #1939
ammario opened this issue Jun 3, 2022 · 2 comments
Closed
Tracked by #1939

Unnest template/examples #2031

ammario opened this issue Jun 3, 2022 · 2 comments

Comments

@ammario
Copy link
Member

ammario commented Jun 3, 2022

There's no point?

@dwahler
Copy link
Contributor

dwahler commented Jun 10, 2022

The reason for these being nested is so that we can embed the entire examples/templates directory, including subdirectories (see #1669), without also including the source code of the examples Go package itself. As far as I can see, the embed package doesn't provide a way to recursively embed a directory while also excluding a configurable subset of files.

I figured the inelegance of an extra level in the directory hierarchy was better than the inelegance of bundling files that never get used, but YMMV.

Removing this nesting would require filtering out non-directories in examples.List instead, and also reverting the documentation changes that were made in #1715.

@ammario ammario closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2022
@kylecarbs
Copy link
Member

@dwahler would embed ./*/* include the source code itself?

The user experience is a bit odd with the nesting because it appears that examples is just a package. Having these at an upper-level fixes it I think.

@misskniss misskniss added invalid and removed Community MVP api Area: HTTP API labels Jun 14, 2022
@misskniss misskniss removed this from the Community MVP milestone Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants