//index.html
{{if gt .Age 18}}
<p>hello, old man, {{.Name}}</p>
{{else}}
<p>hello,young man, {{.Name}}</p>
{{end}}
import (
"text/template"
)
p := Person{Name: "Mary", Age: 11}
t, _ := template.ParseFiles("./index.html")
p := Person{Name: "Mary", Age: 11}
t.Execute(os.Stdout, p)