github.com/inabyte/embed (go): Package embed takes a list for file or folders (likely at `go generate` time) and generates Go code that statically implements the a http.FileSystem.  Embeds files into go programs and provides http.FileSystem interfaces to them.  It adds all named files or files recursively under named directories at the path specified. The output file provides an http.FileSystem interface with optionally zero dependencies on packages outside the standard library.  Features  The source paramaters are a list of folder and/or files, with an optional marker for prefix start. The prefix marker is <->, if you specify a path of ./files/html<->/embed it will import everything under the folder ./files/html/embed as /embed/... for example ./files/html/embed/index.html will be stored as /embed/index.html. There is no limit to the number you can specify but the resultant file system must be unique, if the processing produces two files in the same location Generate() exit with an error.  Embedded assets can be served with HTTP using the `http.Server`. Assuming a directory structure similar to below:  Where main.go contains:  And embed_static.go contains:
Keywords: embedded-files|go