iris/_examples/http_responsewriter/quicktemplate
Gerasimos (Makis) Maropoulos b657c5e6af don't fire ErrServerClosed on manually interrupt signals (CTRL/CMD+C)
Former-commit-id: 673c84dd13bb99c0926aa1b4a6b4eff9745403d8
2020-04-28 05:22:58 +03:00
..
controllers obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
models add quicktemplate example. Iris + Quicktemplate made easy 👍 2017-07-18 21:17:23 +03:00
templates ok almost finished. We're good at deadlines eventually. Tomorrow at 23:59 an article will be published same time with the dev branch merge to master 2017-12-31 02:32:28 +02:00
main_test.go obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
main.go don't fire ErrServerClosed on manually interrupt signals (CTRL/CMD+C) 2020-04-28 05:22:58 +03:00
README.md add quicktemplate example. Iris + Quicktemplate made easy 👍 2017-07-18 21:17:23 +03:00

First of all, install quicktemplate package and quicktemplate compiler

go get -u github.com/valyala/quicktemplate
go get -u github.com/valyala/quicktemplate/qtc

The example has the Go code compiled already for you, therefore:

go run main.go # http://localhost:8080

However there is an instruction below, full documentation can be found at https://github.com/valyala/quicktemplate.

Save your template files into templates folder under the extension *.qtpl, open your terminal and run qtc inside this folder.

If all went ok, *.qtpl.go files must appear in the templates folder. These files contain the Go code for all *.qtpl files.

Remember, each time you change a a /templates/*.qtpl file you have to run the qtc command and re-build your application.