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

embed: file names that start with underscore are not added to FS #44393

Closed
geokb opened this issue Feb 18, 2021 · 2 comments
Closed

embed: file names that start with underscore are not added to FS #44393

geokb opened this issue Feb 18, 2021 · 2 comments

Comments

@geokb
Copy link

geokb commented Feb 18, 2021

It seems that files that start with underscore (e.g. _helpers.tpl) are not added to embed.FS variables. Thankfully for my own use case, I could just rename the file but this is honestly a very weird and unacceptable behavior for the majority of use cases.

@geokb geokb changed the title embed: files that start with _ are not added to FS embed: file names that start with underscore are not added to FS Feb 18, 2021
@seankhliao
Copy link
Member

Duplicate of #43854

@seankhliao seankhliao marked this as a duplicate of #43854 Feb 18, 2021
@linquize
Copy link

filename starting with hyphen, such as -1.txt is also not added in go 1.16

pattern a/-1.txt: cannot embed file a/-1.txt: invalid name -1.txt

@golang golang locked and limited conversation to collaborators Feb 28, 2022
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

4 participants