<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rikoubou</author_name>
  <author_url>https://blog.hatena.ne.jp/rikoubou/</author_url>
  <blog_title>ソースに絡まるエスカルゴ</blog_title>
  <blog_url>https://rikoubou.hatenablog.com/</blog_url>
  <categories>
    <anon>Go言語</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>過去にGo言語に関する記事をいくつか書いてきましたが、どこかでテストケースを書く場合が出てきます。 今回はそのGo言語のテストケースについての備忘録になります。 詳しくは参考資料に挙げているページ様を参照してください。 では、始めます。 １：テストケースに必要なライブラリ テストケースを書く場合には以下のライブラリが必要になるのでそれぞれimportに記述します。 testing Go言語の標準ライブラリで必須。 github.com/stretchr/testify/assert 必須ではないがassertを行うためのライブラリであると便利。 ２：テストケースの書き方 テストケースを書くには…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frikoubou.hatenablog.com%2Fentry%2F2024%2F07%2F09%2F151803&quot; title=&quot;【Go言語】Go言語でテストケースを書く - ソースに絡まるエスカルゴ&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>2024-07-09 15:18:03</published>
  <title>【Go言語】Go言語でテストケースを書く</title>
  <type>rich</type>
  <url>https://rikoubou.hatenablog.com/entry/2024/07/09/151803</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
