<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>podhmo</author_name>
  <author_url>https://blog.hatena.ne.jp/podhmo/</author_url>
  <blog_title>podhmo's diary</blog_title>
  <blog_url>https://pod.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
    <anon>memo</anon>
    <anon>kingpin</anon>
    <anon>cli</anon>
  </categories>
  <description>昔にも似たような記事を書いていたみたいだった。最近のgoでのCLIツールを書く際の心境の変化があったのでその辺をメモしておく。 最近goでCLIのコマンドを作るときの雛形のメモ 心境の変化 心境の変化は２つ コマンドラインオプションをstructで囲む理由が特になくなった サブコマンドがやっぱりほしい コマンドラインオプションをstructで囲む理由が特になくなった 昔はわざわざコマンドラインオプションをstructで囲んで、Run()関数に渡していたのだけれど。そもそもRun()関数が長々と書かれていたらそれはmain.goの記述が長すぎる。 一度しか使われないものはグローバル変数で良いとい…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2020%2F01%2F05%2F021823&quot; title=&quot;最近のgoでCLIのコマンドを作るときの雛形のメモ (updated) - podhmo&amp;#39;s diary&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-01-05 02:18:23</published>
  <title>最近のgoでCLIのコマンドを作るときの雛形のメモ (updated)</title>
  <type>rich</type>
  <url>https://pod.hatenablog.com/entry/2020/01/05/021823</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
