Hi Gophers!

Please take a look at gitfs <https://github.com/posener/gitfs>.

Package gitfs is a complete solution for static files in Go code.

When Go code uses non-Go files, they are not packaged into the binary. The 
common approach to the problem, as implemented by go-bindata 
<https://github.com/jteeuwen/go-bindata> is to convert all the required 
static files into Go code, which eventually compiled into the binary.

This library takes a different approach, in which the static files are not 
required to be "binary-packed", and even no required to be in the same 
repository as the Go code. This package enables loading static content from 
a remote git repository, or packing it to the binary if desired or loaded 
from local path for development process. The transition from remote 
repository to binary packed content, to local content is completely smooth.

The API is simple and minimalistic. The New method returns a (sub)tree of a 
Git repository, represented by the standard http.FileSystem interface. This 
object enables anything that is possible to do with a regular filesystem, 
such as opening a file or listing a directory.

Additionally, the ./fsutil 
<https://github.com/posener/gitfs/blob/master/fsutil> package provides 
enhancements over the http.FileSystem object (They can work with any object 
that implements the interface) such as loading Go templates in the standard 
way, or walking over the filesystem.

Cheers,
Eyal

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/35d61468-51ac-409a-ad5c-6aaa6ede173d%40googlegroups.com.

Reply via email to