<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thaim</author_name>
  <author_url>https://blog.hatena.ne.jp/thaim/</author_url>
  <blog_title>出力を入力へ</blog_title>
  <blog_url>https://thaim.hatenablog.jp/</blog_url>
  <categories>
    <anon>Go</anon>
  </categories>
  <description>AWS SDK for GoなどのSDKを利用する場合のユニットテストの書き方およびプロダクトコードの実装方法が難しい。 AWS公式には Unit Testing with the AWS SDK for Go V2 にて解説があり、モックで差し替えられるようにAPIのインタフェースを利用してテストで差し替えることができるように推奨している。 一方で、このケースにおいてプロダクトコード側をどのように実装すればよいかわからず、またテストも複雑でどのようにテストを増やせばよいかわからなかった。 いろいろと検討して自分の中である程度納得できたのでそのまとめ。とはいえわからないことも沢山あるのでまだま…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthaim.hatenablog.jp%2Fentry%2F2022%2F10%2F25%2F001500&quot; title=&quot;GoでSDK呼び出しをモックできるコードを書く - 出力を入力へ&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>2022-10-25 00:15:00</published>
  <title>GoでSDK呼び出しをモックできるコードを書く</title>
  <type>rich</type>
  <url>https://thaim.hatenablog.jp/entry/2022/10/25/001500</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
