<?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>test</anon>
    <anon>memo</anon>
  </categories>
  <description>test.testlogfileを付けてテストを実行すると、テスト中の以下が分かる。 os.Stat()したファイル os.Open()したファイル os.Getenvした環境変数 これは、例えば、net/http.FileSystemが使われた様なテストなどで苦しめられたときに便利に働くことがある。 例 例えば、hello_test.goと以下のようなファイルがあったとして。 . ├── hello_test.go ├── testdata │ └── hello.json └── x.log 1 directory, 3 files おもむろに以下の様な形でテストを実行してみる。 $ go…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2020%2F08%2F28%2F212325&quot; title=&quot;go testのtest.testlogfileフラグが時々便利 - 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-08-28 21:23:33</published>
  <title>go testのtest.testlogfileフラグが時々便利</title>
  <type>rich</type>
  <url>https://pod.hatenablog.com/entry/2020/08/28/212325</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
