-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat(embed): Implement template loading from embedded filesystem #48
Conversation
Can I somehow support, that we get this merged? |
This repo doesn't seem to have significant activities for the last 4 months so I guess it's just a matter of time until the maintainer(s) merge it. From a technical perspective it should be ready to merge. If it's urgent I suggest you take a look at the workaround at #30 and refactor once this PR gets merged. Under the hood it's the same as implemented here with the non-dynamic renderer. |
+1 for this to be implemented |
Would love to get this merged in 🙏🏼 |
@@ -15,6 +16,7 @@ type Renderer interface { | |||
Add(name string, tmpl *template.Template) | |||
AddFromFiles(name string, files ...string) *template.Template | |||
AddFromGlob(name, glob string) *template.Template | |||
AddFromFS(name string, fsys fs.FS, files ...string) *template.Template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to also have an AddFromFSFuncs
if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a while since I created this PR and the maintainers don't seem to care for a merge. So I'll wait for it to be merged before putting any more effort into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I see, that's a shame. But I used the workaround in #30, not the worst thing in the world 😭
This pull requests implements a function
AddFromFS
as requested by #30 for everything matching the interfacefs.FS
from the standard library (primarilyembed.FS
of course) to get rid of ugly workarounds.This PR breaks compatibility with go version 1.15 and below as it relies on the
fs.FS
interface