- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- ソース を表示
- Go/template へ行く。
- 1 (2020-02-29 (土) 12:04:28)
- 2 (2020-02-29 (土) 12:42:07)
Go Template †
- テンプレート機能。
- htmlなどのテキストに変数などの可変値や制御構造を埋め込み、動的な出力が可能。
{{ . }}
や{{ .var }}
のような記述をする。PythonのDjangoテンプレートにあるフィルタのような機能(pipelines)もある。I am {{.name}}. I'm from {{.from}}. length of string "hello" is {{.msg | len}}
- 汎用的なtextとHTMLドキュメント用のhtmlパッケージがある。