t、err:= template.Parse( {{.MyName .MyAge}} )
{{.MyName .MyAge}}
t.Execute(os.Stdout、struct {MyValue、MyAge string} {"John Doe"、 "40.1"})
Golangは次のようなパッケージを提供しています:
text/template
html/template
テキスト出力とHTML出力を生成するためのデータ駆動型テンプレートを実装します。