t, err := template.Parse({{.MyName .MyAge}}
)
t.Execute(os.Stdout,struct{MyValue,MyAge string}{"John Doe","40.1"})
Golang provides packages like:
text/template
html/template
to implement data-driven templates for generating textual and HTML outputs.