iris/_examples/http_responsewriter/quicktemplate
kataras 907ba28f84 give some more control over request params and their entries for the end-developers
Former-commit-id: 91362d3de5c63faf0d124e66747e40ad0df04fbb
2017-11-23 12:30:13 +02:00
..
controllers 8.4.0 | New MVC Features | Refactor examples and godoc for go 1.9 use. Read HISTORY.md. 2017-08-27 20:35:23 +03:00
models add quicktemplate example. Iris + Quicktemplate made easy 👍 2017-07-18 21:17:23 +03:00
templates give some more control over request params and their entries for the end-developers 2017-11-23 12:30:13 +02:00
main_test.go add quicktemplate example. Iris + Quicktemplate made easy 👍 2017-07-18 21:17:23 +03:00
main.go add quicktemplate example. Iris + Quicktemplate made easy 👍 2017-07-18 21:17:23 +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.