Skip to content

Files

Latest commit

0aa6325 · Aug 17, 2023

History

History

quicktemplate

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 24, 2022
Aug 12, 2020
Aug 12, 2020
Aug 12, 2020
Dec 24, 2022
Aug 17, 2023

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.