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

[QUESTION] Convert embed.FS to afero.MemMapFS #383

Open
dzonerzy opened this issue Dec 14, 2022 · 1 comment
Open

[QUESTION] Convert embed.FS to afero.MemMapFS #383

dzonerzy opened this issue Dec 14, 2022 · 1 comment

Comments

@dzonerzy
Copy link

As the title says is it possible to convert and embed.FS to a MemMapFS? This way I can make the memory FS writable too.

I want to use that FS within fiber, this FS will contains html templates, so a wanna have a set of predefined/default templates defined as (embed.FS) but I also want to be able to add more templates at runtime, thus the request to convert embed.FS to MemMapFS

@bep
Copy link
Collaborator

bep commented Mar 6, 2023

As the title says is it possible to convert and embed.FS to a MemMapFS?

That's not possible. There is an adapter that allows yo to create a fs.Fs from a MemMapFS, but there will be no write operations.

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

2 participants