注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
Go言語でWebサーバを起動 Webサーバを起動 テンプレートファイルを読み込んで表示 Go mainファイル 以下... Go言語でWebサーバを起動 Webサーバを起動 テンプレートファイルを読み込んで表示 Go mainファイル 以下のソースコードを書く main.go package main import ( "log" "net/http" "path/filepath" "sync" "text/template" ) type templateHandler struct { once sync.Once filename string temp1 *template.Template } func (t *templateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { t.once.Do(func() { t.temp1 = template.Must(template.ParseFiles(filepath.Join(
2016/01/26 リンク