Presented on Go(Un)Conference 3kg https://gounconference.connpass.com/event/92794/ nrutil & nrsql : https://github.com/izumin5210/newrelic-contrib-go
![context.Context is not just for cancelation](https://cdn-ak-scissors.b.st-hatena.com/image/square/0284fa28bd5feb03d4cd3330696e4fbe3f92e179/height=288;version=1;width=512/https%3A%2F%2Ffiles.speakerdeck.com%2Fpresentations%2F4e35c1b82c674f98ab84a28cc91f0acd%2Fslide_0.jpg%3F10467356)
本当はGo月Go日に書きたかったけど、ビール飲んで寝てしまったの今日(Go月6日)になりました。 Goのインタフェースは、明示的に実装する必要がなく、インタフェースが定義するメソッドリストをその型が持っていれば、そのインタフェースとして振る舞えます。 構造体に埋め込んだ型が持つメソッドについても、埋込み先の構造体のメソッドの一部としてみなすことができるため、インタフェースの実装の頭数に入れることができます。 インタフェースの実装と埋込みの関係についてはインタフェースの実装パターンという記事に詳しく書いているのでそちらを参考にしてください。 さて、埋込みによって構造体にインタフェース実装させるパターンは思ったよりも使えます。なぜなら、埋込みは単なる匿名フィールドに対して、インタフェースは実装を隠し、型を抽象化ができるからです。このパターンは、共通部分を抜き出して、それを複数の型で使う場合に非
There are several great official and community-supported containers for many programming languages, including Go, but these containers can be quite large. Let's walk through a comparison of methods for building containers for Go applications, then I'll show you a way to statically build Go apps for containerization that are extremely small. Part One: Our "app"We need something to test for our app,
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く