<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ema_hiro</author_name>
  <author_url>https://blog.hatena.ne.jp/ema_hiro/</author_url>
  <blog_title>emahiro/b.log</blog_title>
  <blog_url>https://ema-hiro.hatenablog.com/</blog_url>
  <categories>
    <anon>Go</anon>
  </categories>
  <description>golangで関数に任意引数を取り、その任意引数にmapを指定することで、template場でmapで定義したinterfaceを見て表示を変えたいという実装を考えます。 やりたいこと 以下のようなことをしたいと想定します。 func RendarHTML (flags ...map[&quot;string&quot;]interface{}){ // flags に各種表示を分けるstatusを入れてtemplate側で制御する } golangにおける任意引数とは？ golangでは、LL言語はじめとしたオブジェクト指向言語にあるようなデフォルト引数という機能を使うことができません。 rubyとかだと de…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fema-hiro.hatenablog.com%2Fentry%2F2018%2F01%2F12%2F031455&quot; title=&quot;goで任意引数でtemplateでの表示を変えたりしたい場合の考察 - emahiro/b.log&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-01-12 03:14:55</published>
  <title>goで任意引数でtemplateでの表示を変えたりしたい場合の考察</title>
  <type>rich</type>
  <url>https://ema-hiro.hatenablog.com/entry/2018/01/12/031455</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
