package
Version:
v0.4.4
Opens a new window with list of versions in this module.
Published: Jul 16, 2026
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package tmpl は tazuna.yaml (および include ファイル) を Go template として
解釈するための薄いラッパーを提供します。tazuna.yaml は Unmarshal される前に
一度 Go template として描画されるため、`{{ .Environment }}` のような変数を
埋め込んで環境ごとに異なる値を注入できます。
Render は raw を Go template として解釈し、data を適用した結果を返します。
name はエラーメッセージに使う識別子 (通常はファイルパス) です。
missingkey=error を指定しているため、map に対して未定義キーを参照するテンプレートは
エラーになります。Data のような struct に存在しないフィールド (例: `{{ .Unknown }}`)
を参照した場合も text/template が実行時エラーを返します。
type Data struct {
Environment string
}
Data は tazuna.yaml を Go template として描画する際に参照できる変数の集合です。
フィールドを追加した場合は docs/src/reference/tazuna-yaml.md の
「テンプレート変数」表も更新してください。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.