Recreate embedded filesystems from embed.FS type in current working directory.
Expose the files you've embedded in your binary so users can see and/or tinker with them. See where is this useful for an application example.
//go:embed someFS/*
var bdFS embed.FS
// Just replicate folder Structure
rebed.Tree(bdFS,"")
// Make empty files
rebed.Touch(bdFS,"")
// Recreate entire FS
rebed.Create(bdFS,"")
// Recreate FS without modifying existing files
rebed.Patch(bdFS,"")
You could theoretically embed your web development assets folder and deploy it. The binary could run from the working directory folder generated by rebed
and users could modify the assets and change the website's look (to do this run rebed.Patch
to not overwrite modified files). If asset files are lost or the site breaks, running rebed.Create
replaces all files with original ones.
I'll look at issues and pull requests. Add a clear explanation when doing so!