{"blog_title":"Carpe Diem","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchristina04.hatenablog.com%2Fentry%2F2017%2F07%2F04%2F190000\" title=\"Go\u3067Mock\u3092\u66f8\u304f\u6642\u306eTips - Carpe Diem\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/quoll00/","blog_url":"https://christina04.hatenablog.com/","width":"100%","provider_url":"https://hatena.blog","categories":["Go","DI"],"url":"https://christina04.hatenablog.com/entry/2017/07/04/190000","title":"Go\u3067Mock\u3092\u66f8\u304f\u6642\u306eTips","published":"2017-07-04 19:00:00","description":"\u6982\u8981 \u300cGo\u306fDuck Type\u3060\u304b\u3089Mock\u7528\u610f\u3059\u308b\u306e\u5927\u5909\u3060\u3088\u306d\u300d\u3068\u3088\u304f\u8a00\u308f\u308c\u307e\u3059\u304c\u3001\u305d\u3093\u306a\u3053\u3068\u306f\u306a\u3044\u3067\u3059\u3088\u3001\u3068\u3044\u3046\u8a71\u3002 \u74b0\u5883 golang 1.8.3 1. interface\u81ea\u4f53\u57cb\u3081\u8fbc\u3081\u3070\u5b9f\u88c5\u6e08\u307f\u3068\u89e3\u91c8\u3057\u3066\u304f\u308c\u308b \u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8907\u6570\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3064interfacedoEverything\u304c\u3042\u308a\u3001showUserAge()\u306bDI\u3057\u3066\u8868\u793a\u3055\u305b\u308b\u30ed\u30b8\u30c3\u30af\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002 \u203bDI\u306b\u3064\u3044\u3066\u306f Go\u3067Dependency Injection - Carpe Diem \u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044 type doEverything interface { getAge() int setAge(int\u2026","provider_name":"Hatena Blog","type":"rich","author_name":"quoll00","version":"1.0","height":"190"}