genesis
genesis copied to clipboard
Making the filesystem walkable?
I was wondering if you had any interest in making the http.FileSystem walkable? I'd be happy to contribute this feature.
The use case is to be able to be able precompile templates on startup, rather than on the request. http.Dir(...) already supports walking the filesystem, so the idea is that you'd have two walkable filesystems, http.Dir for development, genesis.FileSystem() for production.
The walk function would be nearly the same as filepath.Walk. Here's what that would look like: https://github.com/shurcooL/httpfs/blob/master/vfsutil/walk.go#L12-L22
Thanks for creating this library!