github.com/mxmcherry/gogenstatic (go): Command gogenstatic generates "static" package, which embeds all the files from public root dir ("--src" param, defaults to "./public") and provides HTTP handler to serve them.  Example usage:  It is intended to be used with go generate: https://blog.golang.org/generate  Assuming, you have this project structure:  Then you can add this comment:  to any of your *.go files (like whatever.go) and run:  in your project dir, and it'll generate "static" subpackage, with all the files from "./public/" embedded:  Then import generated subpackage and use it's handler:  Or, if you want no runtime hash lookups, you can use handler for a single file:
Keywords: embed-files|generator|go|golang|static