#author("2020-02-29T12:42:07+09:00","default:haikikyou","haikikyou")
[[Go]]

#contents

* Go Template [#z49b334e]

- テンプレート機能。
- htmlなどのテキストに変数などの可変値や制御構造を埋め込み、動的な出力が可能。~
&code(){{{ . }}};や&code(){{{ .var }}};のような記述をする。PythonのDjangoテンプレートにあるフィルタのような機能(pipelines)もある。
#geshi{{{
I am {{.name}}. I'm from {{.from}}.
length of string "hello" is {{.msg | len}} 
}}}
- 汎用的なtextとHTMLドキュメント用のhtmlパッケージがある。
-- https://golang.org/pkg/text/template/
-- https://golang.org/pkg/html/template/
* 参考リンク [#z06b9e4c]

- https://golang.org/pkg/text/template/
- https://golang.org/pkg/html/template/


トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
目次
ダブルクリックで閉じるTOP | 閉じる
GO TO TOP