The PrefixDir function
func PrefixDir(prefix string, fs http.FileSystem) http.FileSystemExample
│ main.go
| bindata.go
└───data/
└──────views/
│ ...your templates
└──────public/
│ ...your public assets$ go get -u github.com/go-bindata/go-bindata/...
$ go-bindata -fs ./data/...templatesFS := iris.PrefixDir("./data/views", AssetFile())
app.RegisterView(iris.HTML(templatesFS, ".html"))
publicFS := iris.PrefixDir("./data/public", AssetFile())
app.HandleDir("/", publicFS)Last updated
Was this helpful?