<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ryochack</author_name>
  <author_url>https://blog.hatena.ne.jp/ryochack/</author_url>
  <blog_title>ryochack.blog</blog_title>
  <blog_url>https://ryochack.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
  </categories>
  <description>Go言語でコマンドラインオプションを扱う - そこはかとなく書くよん。 に触発されたので、flagパッケージについて自分で使ってみてハマったところを書いておく。 コマンドラインオプションの略称を登録する flag.IntVar()などのXxxVar()を使う。 これで -boolでも-bでも同じ変数にフラグの結果が反映されるようになる。 $ go run flag_shorthand.go -bool -int 100 -string hoge bool flag = true int flag = 100 string flag = hoge $ go run flag_shorthand.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryochack.hatenablog.com%2Fentry%2F2013%2F04%2F17%2F232753&quot; title=&quot;Go言語のflagパッケージを使う - ryochack.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>2013-04-17 23:27:53</published>
  <title>Go言語のflagパッケージを使う</title>
  <type>rich</type>
  <url>https://ryochack.hatenablog.com/entry/2013/04/17/232753</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
