/bindatafs

An Afero Fs abstraction of go-bindata assets

Primary LanguageGo

bindatafs

Bindatafs combines the Afero file system abstraction with file embedding of go-bindata.

How to use

Getting it

go get github.com/Schobers/bindatafs

Using it

  1. Install go-bindata
  2. Generate your bindata using go-bindata
  3. Create an bindatafs file system instance:
var fs afero.Fs = bindatafs.NewFs(MustAsset, AssetInfo, AssetNames)

or

var fs afero.Fs = &bindatafs.Fs{Asset: MustAsset, Info: AssetInfo, Names: AssetNames}

Forks of go-bindata

Bindatafs works with any fork of go-bindata that provides the same API as the original, namely the methods MustAsset, AssetInfo and AssetNames. Tested with: