<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ktr_0731</author_name>
  <author_url>https://blog.hatena.ne.jp/ktr_0731/</author_url>
  <blog_title>blog.syfm</blog_title>
  <blog_url>https://syfm.hatenablog.com/</blog_url>
  <categories>
    <anon>Go</anon>
    <anon>Notes</anon>
  </categories>
  <description>Go でテストを実行する際は動的に生成された main 関数がエントリポイントとなっています。 Go 1.13 からはテスト実行時のテストフラグ (-v や -coverprofile など) の登録がこの生成された main 内で行われるようになったため、 main より先に実行される init 内でフラグの登録を行っているテストではフラグのパースがうまく動かず、テストが落ちるようになります。 たとえば、自分が開発している Evans では golden files testing のために --update フラグを e2e パッケージで用意し、これが有効になっている場合のみ golden…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsyfm.hatenablog.com%2Fentry%2F2019%2F10%2F01%2F063436&quot; title=&quot;Go 1.13 にアップデートするとテスト時に &amp;quot;flag provided but not defined&amp;quot; エラーが発生するケース - blog.syfm&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>2019-10-01 06:34:36</published>
  <title>Go 1.13 にアップデートするとテスト時に &quot;flag provided but not defined&quot; エラーが発生するケース</title>
  <type>rich</type>
  <url>https://syfm.hatenablog.com/entry/2019/10/01/063436</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
