In the last couple of days I made a program called Horcrux which allows you to split a file into any number of horcruxes, a subset of which can then be recombined to resurrect the original file. In the process I learnt a lot about the io.Reader and io.Writer interface, and thought I would do a writeup to help build intuition for all the people out there who inevitably will find themselves using th
これはGo Advent Calendar 2018の14日目の記事となる。 この記事ではGoogleが提供するGoのDependency Injection(DI、依存性の注入)ツールであるWireを使ったDIの概要と、Wireで利用可能なDI関数の戻り値シグネチャのパターンを紹介する。 github.com/google/wire https://github.com/google/wire Compile-time Dependency Injection With Go Cloud’s Wire | The Go blog https://blog.golang.org/wire TL;DR WireコマンドはGoogle謹製のGoでDI(依存性の注入)を行なうツール https://github.com/google/wire 依存の注入・初期化、依存の注入・初期化を繰り返して多
本記事は Go Advent Calendar 2019 11 日目の記事です。 Go はシンプルな言語機能・シンタックスが特徴であり、命名規則にもそのシンプルさが表れています。 本記事では、公式や著名な Go エンジニア、OSS などから見られる Go らしい命名規則を紹介します。 今更なテーマかもしれませんが、意外にも公私共々で命名規則が意識されていないコードを時折見かけるので、自戒も込めて記します。 誤った内容があれば Twitter でご指摘いただければと思います。 パッケージ名簡潔にするEffective Go では、short, concise, evocative なパッケージ名が望ましいとされます。 これはパッケージ名に限らずほとんどあらゆる命名において役立つ指針だと思います。 また、「パッケージ名は一言で何をするかを表すエレベーターピッチだ」という Dave Cheney
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く