<?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>goには２つの値の型があります 値型 参照型 値型と参照型 関数に渡されるときにコピーされる。 そのため、呼び出し元で引数に指定した値型の変数は関数に渡されるタイミングでコピーされ、コピーされた値が関数の呼び出しに使用されるので、呼び出し元の値は変化しない。 以下のコードで確認する func main() { a := 1 b := 1 sampleFunc(a, &amp;b) fmt.Println(a) // 値渡し fmt.Println(b) //参照渡し } func sampleFunc(a int, b *int) { a = a + 1 *b = *b + 1 } メソッド内で使われ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fema-hiro.hatenablog.com%2Fentry%2F20170802%2F1501605623&quot; title=&quot;参照型を作成するmake - 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>https://ws-fe.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=4621300253&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=emahiro-22</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-08-02 01:40:23</published>
  <title>参照型を作成するmake</title>
  <type>rich</type>
  <url>https://ema-hiro.hatenablog.com/entry/20170802/1501605623</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
