hotfix: fixed go:embed directive to include partials for resources #57
Conversation
lgtm |
The templates/embed.go:8:14: pattern */*: cannot embed directory content/shared: contains no embeddable files I believe this is a known issue, see: golang/go#43854 . Looks like it will be fixed in a future go release, but maybe not until 1.18 :/ |
@saurori Files starting with The automatically generated files cannot account for all subfolders of the directory, since embed uses filepath.Glob to find files and this function does not support Fortunately you can add as many |
Yeah, @saurori, as you mentioned the issue on golang, it is a limitation of golang 1.16 and 1.17 and not easy to handle it automatically since your files are not in the standard directory created by generators. I think once we document it, it could be helpful but currently, we just started supporting them, and are still not clearly documented. |
I'm aware of the limitations as pointed out in the Golang issue. I was more pointing out that using EDIT: @sio4 yeah I think some documentation or a comment would be helpful 👍 |
Yeah, I know you exactly mentioned that and linked the issue on golang repo. Thanks for pointing out that issue too! By the way, The current implementation does not break users who just use generated templates within standard paths such as |
Fixed
go:embed
directive to include partials (starting with_
) in the resource directories also included successfully.fixes #55 along with gobuffalo/buffalo#2178