{"description":"qiita\u304b\u3089\u8ee2\u8f09 golang\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8(\u4f8b\u3048\u3070 text/template)\u3067\u306f\u3001FuncMap\u3092\u4f7f\u3046\u3053\u3068\u3067\u597d\u304d\u306a\u95a2\u6570\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002\u306e\u3067\u7df4\u7fd2\u304c\u3066\u3089\u7c21\u5358\u306a\u8a08\u7b97\u6a5f\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059: package example_test import ( \"bytes\" \"fmt\" \"log\" \"text/template\" ) func ExampleTemplateCalculator() { funcMap := template.FuncMap{ \"add\": func(a, b int) int { return a + b }, \"sub\": func(a, b int) int { ret\u2026","blog_url":"https://atotto.hatenadiary.jp/","url":"https://atotto.hatenadiary.jp/entry/2014/07/28/225054","published":"2014-07-28 22:50:54","provider_name":"Hatena Blog","categories":["golang"],"version":"1.0","author_name":"atotto","height":"190","width":"100%","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/atotto/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatotto.hatenadiary.jp%2Fentry%2F2014%2F07%2F28%2F225054\" title=\" - memo\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","title":"","image_url":null,"blog_title":"memo\u30e1\u30e2"}