<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>otiai10</author_name>
  <author_url>https://blog.hatena.ne.jp/otiai10/</author_url>
  <blog_title>DRYな備忘録</blog_title>
  <blog_url>https://otiai10.hatenablog.com/</blog_url>
  <categories>
    <anon>go</anon>
    <anon>reflect</anon>
  </categories>
  <description>問題 メタプログラミング的なことをするうえで、ある名前のpackageの中で定義されているstruct名を抽象的に取得したいことがあったので、その方法をメモ 方法 go/ast go/parser あたりを使う 準備 % cd % mkdir $GOPATH/src/foo % vi $GOPATH/src/foo/foo.go % vi $GOPATH/src/foo/hoge.go $GOPATH/src/foo/foo.go package foo type Foo struct{} type Bar struct{} type Buz struct{} type myPrivateTy…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fotiai10.hatenablog.com%2Fentry%2F2014%2F07%2F25%2F085053&quot; title=&quot;【Go言語】packageに定義されてるstruct名を取得する - DRYな備忘録&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://cdn-ak.f.st-hatena.com/images/fotolife/o/otiai10/20140725/20140725084754.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-07-25 08:50:53</published>
  <title>【Go言語】packageに定義されてるstruct名を取得する</title>
  <type>rich</type>
  <url>https://otiai10.hatenablog.com/entry/2014/07/25/085053</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
