BindataFS will compile QOR templates into binary utilizing go-bindata



Install BindataFS

$ go install

To initialize BindataFS for your project, set the path you want to store BindataFS related files, e.g. config/bindatafs:

$ bindatafs config/bindatafs

And then to use BindataFS with QOR Admin:

import "<your_project>/config/bindatafs"

func main() {
  Admin = admin.New(&qor.Config{DB: db.Publish.DraftDB()})

Compiling QOR templates is as easy as:

go run main.go --compile-qor-templates

Finally, run with compiled templates:

go run -tags 'bindatafs' main.go

And, if need be, to run normally again:

go run main.go

results matching ""

    No results matching ""