
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
AtreugoでGo標準搭載のテンプレートエンジンを使う - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
AtreugoでGo標準搭載のテンプレートエンジンを使う - Qiita
package main import ( "github.com/savsgio/atreugo/v11" "text/template" "time" ) func main() { con... package main import ( "github.com/savsgio/atreugo/v11" "text/template" "time" ) func main() { config := atreugo.Config{ Addr: "127.0.0.1:8000" } server := atreugo.New(config) app.GET("/", renderIndex) if err := app.ListenAndServe(); err != nil { panic(err) } } func renderIndex(ctx *atreugo.RequestCtx) error { tpl := template.Must(template.ParseFiles("template.tpl")) data := map[string]string{ "Now