<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gsf_zero1</author_name>
  <author_url>https://blog.hatena.ne.jp/gsf_zero1/</author_url>
  <blog_title>いろいろ備忘録日記</blog_title>
  <blog_url>https://devlights.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
  </categories>
  <description>概要 なんで？ 解決策 省略変数宣言せずに済ます 別の名前か型で定義しておいて、後で設定する おすすめ書籍 概要 自分でも未だにたまにやるミスで、今まで他の人にも何度か「なんでこうなるの？」って聞かれたのでついでにメモメモ。 書籍「プログラミング言語 Go」に丁度いい例があったので、それを流用しています。 いきなりですが、以下のコードを御覧ください。 package scope import ( &quot;os&quot; &quot;github.com/devlights/gomy/output&quot; ) var ( // 現在の作業ディレクトリ. CommonMistake1関数で使う前に初期化されている想定 _cwd…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevlights.hatenablog.com%2Fentry%2F2020%2F08%2F16%2F024216&quot; title=&quot;Goメモ-100 (省略変数宣言 := と変数スコープ でよくやってしまうミス ) - いろいろ備忘録日記&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>https://m.media-amazon.com/images/I/41meaSLNFfL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-08-16 02:42:16</published>
  <title>Goメモ-100 (省略変数宣言 := と変数スコープ でよくやってしまうミス )</title>
  <type>rich</type>
  <url>https://devlights.hatenablog.com/entry/2020/08/16/024216</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
