2023-05-30から1日間の記事一覧
すごい久しぶりに goコードを書いたらいろいろと忘れていたのでメモ templateに任意の属性を出力するようなコードを書きたかったが, package main import ( "html/template" "log" "os" ) var htmlTemplate = ` <p {{.Attr}}> ` type Data struct { Attr string } func ma</p>…
すごい久しぶりに goコードを書いたらいろいろと忘れていたのでメモ templateに任意の属性を出力するようなコードを書きたかったが, package main import ( "html/template" "log" "os" ) var htmlTemplate = ` <p {{.Attr}}> ` type Data struct { Attr string } func ma</p>…