package main import ( "fmt" "tntester/template_nest" ) func main(){ templates := map[string]string{ "00-simple-page": `
A fairly simple page to test the performance of Template::Nest.
`, "00-simple-component": ``} json := []byte(`{ "TEMPLATE": "00-simple-page", "variable": "Simple Variable", "simple_component": { "TEMPLATE":"01-simple-component", "variable": "Simple Variable in Simple Component" } }`) nest := template_nest.New( templates ) html := nest.Render( json ) fmt.Println( html ) }