Go言語 Echoサーバーでテンプレートエンジンを試してみる。
ほぼサンプルどうり簡単につくってみる。
対象となるファイルを起動時に読み込む。
public/views/*.html
render時の引数で、そのファイル名を指定する。
return c.Render(http.StatusOK, "hello", "world")
全体サンプル gist.github.com
次回、pongo2使ってみよう。
ほぼサンプルどうり簡単につくってみる。
対象となるファイルを起動時に読み込む。
public/views/*.html
render時の引数で、そのファイル名を指定する。
return c.Render(http.StatusOK, "hello", "world")
全体サンプル gist.github.com
次回、pongo2使ってみよう。