pkger/fs/memfs/memfs_test.go

27 lines
682 B
Go
Raw Normal View History

2019-09-01 00:00:24 +03:00
package memfs
import (
"log"
"github.com/markbates/pkger/fs/fstest"
"github.com/markbates/pkger/here"
)
func NewFS() *FS {
fs, err := New(here.Info{})
if err != nil {
log.Fatal(err)
}
return fs
}
var Folder = fstest.TestFiles{
"/main.go": {Data: []byte("!/main.go")},
"/go.mod": {Data: []byte("!/go.mod")},
"/go.sum": {Data: []byte("!/go.sum")},
"/public/index.html": {Data: []byte("!/public/index.html")},
"/public/images/mark.png": {Data: []byte("!/public/images/mark.png")},
"/templates/a.txt": {Data: []byte("!/templates/a.txt")},
"/templates/b/b.txt": {Data: []byte("!/templates/b/b.txt")},
}