<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>a666666</author_name>
  <author_url>https://blog.hatena.ne.jp/a666666/</author_url>
  <blog_title>@kyanny's blog</blog_title>
  <blog_url>https://blog.kyanny.me/</blog_url>
  <categories>
  </categories>
  <description>&amp;string(byteArray) のように直接ポインタを得ることはできない。変数に代入してから &amp; 演算子を使う必要がある。 package main import &quot;fmt&quot; func myLen(s *string) int { return len(*s) } func main() { b := []byte(`hello`) //NG: cannot take the address of string(b) //n := myLen(&amp;string(b)) //OK tmp := string(b); n := myLen(&amp;tmp) fmt.Println(n) } http…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.kyanny.me%2Fentry%2F2020%2F09%2F02%2F222958&quot; title=&quot;Go: 型変換した値を変数に入れずにアドレスを得ることはできない - @kyanny&amp;#39;s blog&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>2020-09-02 22:29:58</published>
  <title>Go: 型変換した値を変数に入れずにアドレスを得ることはできない</title>
  <type>rich</type>
  <url>https://blog.kyanny.me/entry/2020/09/02/222958</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
