qor_bindatafs_example
Steps:
- basic setup with go modules, based on https://doc.getqor.com/get_started.html
- follow bindatafs README.md https://github.com/qor/bindatafs:
- install
GO111MODULE=off go get -u -f github.com/qor/bindatafs/...
have to disable go modules, to have bindatafs be compiled to$GOPATH/bin/bindatafs
.
bindatafs is a CLI; - initialize bindatafs with
bindatafs config/bindatafs
; - add
config/compile/compile.go
;
see https://github.com/qor/bindatafs#using-namespace.
some QOR modules are use assetfs namespaces; - import
config/bindatafs
tomain.go
for side effect purpose.
- install
- run/build with bindatafs:
first you need to executego run config/compile/compile.go
to compile registered paths into binary. after templates were successfully compiledconfig/bindatafs/templates_bindatafs.go
file appears.
make build
- produces casual build
make build_bindatafs
- produces build with built in templates