• Stars
    star
    23
  • Rank 981,944 (Top 20 %)
  • Language
    Go
  • License
    BSD 3-Clause "New...
  • Created about 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Recreates directory and files from embedded filesystem using Go 1.16 embed.FS type.

rebed

codecov Build Status Go Report Card go.dev reference Awesome Sourcegraph

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.

Install with (requires Go 1.16+)

go get -u github.com/soypat/rebed

Five 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, "")

// Runs Patch if no conflicting file is found, else error.
err := rebed.Create(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!

More Repositories

1

gopherlings

📘️ Learn Go by fixing tiny incorrect programs
Go
632
star
2

mu8

Genetic algorithm for unsupervised machine learning in Go.
Go
109
star
3

sdf

A Go library for signed distance function shape generation. Read as 3D printing shape design.
Go
88
star
4

gitaligned

Find out where you fall on the Open-Source Character Alignment Chart
Go
74
star
5

cyw43439

Driver for the Wifi+bluetooth integrated circuit on the pico.
Go
74
star
6

natiu-mqtt

A dead-simple, extensible MQTT implementation well suited for embedded systems.
Go
58
star
7

go-maquina

Small finite-state machine library for Go
Go
41
star
8

peasocket

little websocket implementation
Go
34
star
9

go-presentx

golang's present tool but with code syntax highlighting
CSS
33
star
10

godesim

ODE system solver made simple. For IVPs (initial value problems).
Go
21
star
11

exif

Dead simple exchangeable image file format tools for Go optimized for large image files using lazy loading.
Go
18
star
12

tiny-ahrsim

TinyGo attitude estimation simulation applet.
Go
17
star
13

threejs-golang-example

THREE.js example of rotating cube using gopherjs bindings. 160 lines of Go code.
JavaScript
14
star
14

sdf3ui

Browser based 3D model visualizer for use with soypat/sdf package.
Go
12
star
15

glgl

OpenGL bindings for Go that are in the goldilocks level of abstraction zone.
Go
12
star
16

three

syscall/js bindings for three.js in-browser 3D graphics.
Go
10
star
17

neurus

Neural network minimal working example in Go fit for teaching.
Go
10
star
18

ether-swtch

Low level Ethernet stack marshaller/unmarshaller for use in tiny places.
Go
8
star
19

natiu-wsocket

MQTT websocket implementation using natiu-mqtt.
Go
6
star
20

lap

linear algebra package. like gonum/mat, but small. lets say gonum-lite
Go
5
star
21

goldmark-latex

A LaTeX renderer for Goldmark. Produce .tex files from markdown.
Go
5
star
22

go-play3d

3D math playground for Go.
Go
4
star
23

sv

idiomatic go http server
Go
3
star
24

ieeeztreme14

IEEExtreme 14.0 solved problems for team finally_cflat
Go
3
star
25

gwasm

Common utilities I find myself rewriting too often across Go WASM projects.
Go
3
star
26

peamodbus

Fault tolerant, TCP modbus implementation in Go that just works. Apt for embedded systems.
Go
3
star
27

mdc

Material Design Components for use with Vecty in the most minimalistic fashion.
Go
2
star
28

decimate

csv file decimator/downsampler for reducing number of points of a curve or signal.
Go
2
star
29

plot3

3D line plots in pure Go
Go
2
star
30

tinygo-arduino-examples

Compilation of LCD screen, ADC, and output examples.
Go
2
star
31

go-canard

Go port of libcanard. WIP.
Go
2
star
32

whittileaks

Hardcore class notes for mechanical engineering.
TeX
2
star
33

manigold

3D Mesh creation, manipulation and optimization library.
Go
2
star
34

go-mod-tricks

go.mod file and `go mod` command tricks to make using modules a breeze.
2
star
35

piaa

Industrial extension board for Raspberry Pi Pico (W). RS485, EMI insulated digital input/output pins.
1
star
36

decaffeinator

An effort to relieve the establishment of caffeine.
Go
1
star
37

so

MWE tutorial of .so dynamic linking in C and Go.
C
1
star
38

vecty-examples

Basic usage of Vecty framework examples.
Go
1
star
39

tiny-sproto

A simple Point-to-Point Protocol implementation written in Go.
Go
1
star
40

wchart

syscall/js bindings for Chart.js
Go
1
star
41

novatex

Guía del LaTeX para principiantes
TeX
1
star
42

go-fem

Go packages for finite element analysis/methods.
Go
1
star
43

net

Temporary repo for minimal net package from go std lib for use with tinygo until v0.18.0 released
Go
1
star
44

fea-two

Elementos Finitos II @ ITBA
MATLAB
1
star
45

combinatrix

Combinar horarios para ITBA """dinamicamente"""
Go
1
star
46

go-qap

CERN's quality assurance plan (QAP) to solve the document naming convention problem.
Go
1
star
47

shaders

Wai- wha? Shaders? Like GPU stuff? Yeah, gpu stuff.
Go
1
star
48

go-proy

Proyectos para practicar golang
Go
1
star
49

seqs

seqs: the hottest, most idiomatic TCP implementation on the internet.
Go
1
star