<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>oinume</author_name>
  <author_url>https://blog.hatena.ne.jp/oinume/</author_url>
  <blog_title>oinume journal</blog_title>
  <blog_url>https://journal.lampetty.net/</blog_url>
  <categories>
    <anon>Go</anon>
  </categories>
  <description>タイトルの通りだけど知らなかったので。明示的に空のsliceやmapを作らなくてもいいのは楽だ。 http://play.golang.org/p/veOWHGDdcn package main import &quot;fmt&quot; func emptyMap() map[string]string { return nil } func emptySlice() []string { return nil } func main() { emptySlice := emptySlice() fmt.Printf(&quot;slice len = %d\n&quot;, len(emptySlice)) emptyMap …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjournal.lampetty.net%2Fentry%2Fnil-to-empty-slice-and-map&quot; title=&quot;Goでnilなsliceやmapを返すと空のsliceやmapになる - oinume journal&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>http://ecx.images-amazon.com/images/I/51ZzoXpsmqL.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-09-15 02:58:25</published>
  <title>Goでnilなsliceやmapを返すと空のsliceやmapになる</title>
  <type>rich</type>
  <url>https://journal.lampetty.net/entry/nil-to-empty-slice-and-map</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
