Recreate embedded filesystems from embed.FS type in current working directory.

rebed

codecov Build Status Go Report Card go.dev reference Awesome

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.

Four actions available:

//go:embed someFS/*
var bdFS embed.FS

// Just replicate folder Structure
rebed.Tree(bdFS,"")

// Make empty files
rebed.Touch(bdFS,"")

// Recreate entire FS
rebed.Write(bdFS,"")

// Recreate FS without modifying existing files
rebed.Patch(bdFS,"")

/* Walk allows you operate on each file as you wish */

Where is this useful?

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.Write replaces all files with original ones.

Contributing

I'll look at issues and pull requests. Add a clear explanation when doing so!

Owner
Patricio Whittingslow
Systems Engineer ~ Aerospace
Patricio Whittingslow
Similar Resources

Utility for working with files and folders stored on Google Drive

skicka Utility for working with files and folders stored on Google Drive. Note: skicka is not an official Google product! Intro skicka makes it easy t

Nov 15, 2021

Fast, dependency-free, small Go package to infer the binary file type based on the magic numbers signature

filetype Small and dependency free Go package to infer file and MIME type checking the magic numbers signature. For SVG file type checking, see go-is-

Jan 3, 2023

Maybe is a Go package to provide basic functionality for Option type structures

Maybe Maybe is a library that adds an Option data type for some native Go types. What does it offer: The types exported by this library are immutable

Oct 4, 2022

Add a type for paths in Go.

pathtype Treat paths as their own type instead of using strings. This small package wraps functions from the standard library to create a new Path typ

Sep 26, 2022

A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working directory easy, even for fairly large files.

httpfolder A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working direc

Sep 12, 2022

Golang-based simple file server to serve files of the current working directory

fileserve Golang-based simple file server to serve static files of the current working directory File sharing in LAN or home network Web application t

Jan 9, 2022

Get an embed.FS from inside an embed.FS

Get an embed.FS from inside an embed.FS

embed.FS wrapper providing additional functionality Features Get an embed.FS from an embedded subdirectory Handy Copy(sourcePath, targetPath) method t

Sep 27, 2022

A test repo to demonstrate the current (go1.17.2) issue when trying to use retractA test repo to demonstrate the current (go1.17.2) issue when trying to use retract

test-go-mod-retract This is a test repo to demonstrate the current (go1.17.2) issue when trying to use retract in go.mod to retract a version in a non

Oct 16, 2021

a better customizable tool to embed files in go; also update embedded files remotely without restarting the server

fileb0x What is fileb0x? A better customizable tool to embed files in go. It is an alternative to go-bindata that have better features and organized c

Dec 27, 2022

Nat-type-identifier-go - A Go based implementation of Network Address Transalation (NAT) type identifier based on nat-type-identifier

nat-type-identifier-go A Go based implementation of Network Address Transalation

May 8, 2022

The go mod init command initializes and writes a new go.mod file in the current directory

go mod: The go mod init command initializes and writes a new go.mod file in the current directory, in effect creating a new module rooted at the curre

Nov 21, 2021

A file wiper (for the current directory) written in Go

A file wiper (for the current directory) written in Go

A file wiper (for the current directory) written in Go. Rewrites all files within all accessible directories from the current directory, including itself. to be blank, usually making victims think nothing was harmed.

Dec 9, 2021

Turn .mp3 files in current directory to a podcast feed just one command.

dir2cast Turn .mp3 files in current directory to a podcast feed just one command. Then you can subscribe to it with your favorite podcast client, down

Jun 27, 2022

Library for working with golang telegram client + bot based on tdlib. This library was taken from the user Arman92 and changed for the current version of tdlib.

go-tdlib Golang Telegram TdLib JSON bindings Install To install, you need to run inside a docker container (it is given below) go get -u github.com/ka

Dec 2, 2022

A HTTP RESTful type kv database which embedded some frequently-used mid-ware.

A HTTP RESTful type kv database which embedded some frequently-used mid-ware.

Apr 4, 2022

Go-wd - Get the same working directory path at 'go run' and after 'go build'

go-wd Get the same working directory path at 'go run' and after 'go build' Usage

Jan 30, 2022

A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Containers and other Artifacts, Suitable for CI. Table of Contents Abstract Features Installation

Jan 1, 2023

A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Containers and other Artifacts, Suitable for CI. Abstract Trivy (tri pronounced like trigger, vy

Jan 9, 2023

A vulnerability scanner for container images and filesystems

A vulnerability scanner for container images and filesystems

A vulnerability scanner for container images and filesystems

Jan 1, 2023
Related tags
Embed files into a Go executable

statik statik allows you to embed a directory of static files into your Go binary to be later served from an http.FileSystem. Is this a crazy idea? No

Jan 6, 2023
Embed arbitrary resources into a go executable at runtime, after the executable has been built.

ember Ember is a lightweight library and tool for embedding arbitrary resources into a go executable at runtime. The resources don't need to exist at

Nov 9, 2022
Ghostinthepdf - This is a small tool that helps to embed a PostScript file into a PDF

This is a small tool that helps to embed a PostScript file into a PDF in a way that GhostScript will run the PostScript code during the

Dec 20, 2022
Go copy directory recursively

copy copy copies directories recursively. Example Usage err := Copy("your/directory", "your/directory.copy") Advanced Usage // Options specifies optio

Dec 30, 2022
FSManager - Tree view Simple util to displays the directory structure of a path or of the disk in a drive graphically.

FSManager - Tree view Simple util to displays the directory structure of a path or of the disk in a drive graphically. If you don't specify a drive or

Oct 9, 2021
List all files (recursively) in a directory

typewalk List all files (recursively) in a directory Usage: recursively walk > ./typewalk.exe walk --path "C:\\" merge two files > ./typewalk.exe merg

Nov 5, 2021
Dirmap is a tool for generating a directory map.

dirmap ?? dirmap is a tool for generating a directory map. It extracts a part of the document from markdown or source code of each directory and uses

Nov 21, 2022
A Go filesystem package for working with files and directories

Stowage A Go filesystem package for working with files and directories, it features a simple API with support for the common files and directories ope

May 28, 2021
Yet another Go package for working with *.golden test files, with a focus on simplicity.

go-golden Yet another Go package for working with *.golden test files, with a focus on simplicity. Import import "github.com/jimeh/go-golden" Usage fu

Aug 3, 2022
go tool for working with /etc/hosts files

hostsfile This library, and the associated command line binary, will help you manipulate your /etc/hosts file. Both the library and the binary will le

Dec 30, 2022