{"id":13413728,"url":"https://github.com/soypat/rebed","last_synced_at":"2025-08-01T06:12:11.577Z","repository":{"id":53465715,"uuid":"339816080","full_name":"soypat/rebed","owner":"soypat","description":"Recreates directory and files from embedded filesystem using Go 1.16 embed.FS type.","archived":false,"fork":false,"pushed_at":"2022-02-18T13:20:07.000Z","size":34,"stargazers_count":29,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T17:52:45.086Z","etag":null,"topics":["embedded","embedded-files","filesystem","golang","resource-embedding","static-resources"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soypat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-17T18:19:49.000Z","updated_at":"2025-03-29T23:44:42.000Z","dependencies_parsed_at":"2022-08-27T18:41:22.182Z","dependency_job_id":null,"html_url":"https://github.com/soypat/rebed","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/soypat/rebed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soypat%2Frebed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soypat%2Frebed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soypat%2Frebed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soypat%2Frebed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soypat","download_url":"https://codeload.github.com/soypat/rebed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soypat%2Frebed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265682710,"owners_count":23810727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","embedded-files","filesystem","golang","resource-embedding","static-resources"],"created_at":"2024-07-30T20:01:47.559Z","updated_at":"2025-07-18T00:03:16.047Z","avatar_url":"https://github.com/soypat.png","language":"Go","readme":"# rebed\n[![codecov](https://codecov.io/gh/soypat/rebed/branch/main/graph/badge.svg)](https://codecov.io/gh/soypat/rebed)\n[![Build Status](https://travis-ci.org/soypat/rebed.svg?branch=main)](https://travis-ci.org/soypat/rebed)\n[![Go Report Card](https://goreportcard.com/badge/github.com/soypat/rebed)](https://goreportcard.com/report/github.com/soypat/rebed)\n[![go.dev reference](https://pkg.go.dev/badge/github.com/soypat/rebed)](https://pkg.go.dev/github.com/soypat/rebed)\n[![Awesome](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go/blob/master/README.md#resource-embedding)\n[![Sourcegraph](https://sourcegraph.com/github.com/soypat/rebed/-/badge.svg)](https://sourcegraph.com/github.com/soypat/rebed?badge)\n\nRecreate embedded filesystems from embed.FS type in current working directory. \n\nExpose the files you've embedded in your binary so users can see and/or tinker with them. See [where is this useful](#where-is-this-useful) for an application example.\n\nInstall with (requires Go 1.16+)\n\n```shell-script\ngo get -u github.com/soypat/rebed\n```\n\n## Five actions available:\n\n```go\n\n//go:embed someFS/*\nvar bdFS embed.FS\n\n// Just replicate folder Structure\nrebed.Tree(bdFS, \"\")\n\n// Make empty files\nrebed.Touch(bdFS, \"\")\n\n// Recreate entire FS\nrebed.Write(bdFS, \"\")\n\n// Recreate FS without modifying existing files\nrebed.Patch(bdFS, \"\")\n\n// Runs Patch if no conflicting file is found, else error.\nerr := rebed.Create(bdFS, \"\")\n\n/* Walk allows you operate on each file as you wish */\n```\n\n### Where is this useful?\nYou 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.\n\n## Contributing\nI'll look at issues and pull requests. Add a clear explanation when doing so!\n","funding_links":[],"categories":["Resource Embedding","嵌入的资源","Relational Databases","Go"],"sub_categories":["HTTP Clients","HTTP客户端"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoypat%2Frebed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoypat%2Frebed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoypat%2Frebed/lists"}