Go Template Engine

Go Template Engine

By: Stephen Patrick | 11 Sep 2016 | Category: Go Template Engine

Go Template Engine

Go provides a template engine that allows us to define a template consisting of text that conforms to some desired structure with data to produce a final output. We can parameterize a template with meaningful argument names. At runtime the data passed to the template is matched with the arguments by the template engine and the argument placeholders are expanded to produce output for a given context.

Read More

Go Parsing Templates

By: Stephen Patrick | 11 Sep 2016 | Category: Go Template Engine

Go Parsing Templates

As mentioned previously Go provides a template engine that allows us to create template files containing text content which can be rendered as html content. This functionality is provided by the html/template package. Normally, when we wish to create a template we use one of the parse functions of the html/template package.

Read More