<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>lirlia</author_name>
  <author_url>https://blog.hatena.ne.jp/lirlia/</author_url>
  <blog_title>フラミナル</blog_title>
  <blog_url>https://blog.framinal.life/</blog_url>
  <categories>
    <anon>Go</anon>
    <anon>Golang</anon>
  </categories>
  <description>Go の pflag パッケージってどうやって引数を処理してるんだろうが気になったので、ちょっと調べてみました。 引数を配列にして返すだけのコードを書いてみます。 package main import ( &quot;fmt&quot; flag &quot;github.com/spf13/pflag&quot; ) type Args struct { Paths []string } func main() { args := Args{} // os.Args[1:] を取得して、フラグを解析しています。 // これより前にフラグのセットを終える必要がある flag.Parse() args.Paths = flag.Ar…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.framinal.life%2Fentry%2F2022%2F08%2F20%2F150435&quot; title=&quot; pflag がどのように args を取得しているのかを追う - フラミナル&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://cdn-ak.f.st-hatena.com/images/fotolife/l/lirlia/20220820/20220820144721.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-08-20 15:04:35</published>
  <title> pflag がどのように args を取得しているのかを追う</title>
  <type>rich</type>
  <url>https://blog.framinal.life/entry/2022/08/20/150435</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
