Skip to content

Releases: Klaus-Tockloth/dagote

Release v1.0.0

21 Nov 10:17
Compare
Choose a tag to compare

Purpose

Allows usage of arbitrary JSON, YAML, TOML, CSV, XML, TEXT in Go templates.

General concept

'dagote' executes your text or html template set, and injects (optional) arbitrary content as 'dot' (.) data.

Scenario 1:
We inject no 'dot' data into the start template. We load all data (readJSON, readXML, ...) dynamically within our template set. We use the functions for data loading for this.

Scenario 2:
We inject configuration data as 'dot' data into the start template. Data transforming is applied before injection. In other words, the configuration data can be arbitrary JSON, YAML, CSV, CSVMap, Text, Lines, XML or TOML. Within the template set, we process the configuration data, e.g. to load arbitrary data (readJSON, readXML, ...).

Scenario 3:
We inject content data as 'dot' data into the start template. Data transforming is applied before injection. In other words, the content data can be arbitrary JSON, YAML, CSV, CSVMap, Text, Lines, XML or TOML. Within the template set, we process the content data. It is typically not necessary to load more data.