golang の WAF のオートリロード

https://github.com/codegangsta/gin ↑ この gin ってやつを使うと ソースコードの変更検知 + オートリロード が可能になる。 ちなみに、以下の WAF とは別物です。 https://github.com/gin-gonic/gin https://github.com/codegangsta/gin#supporting-gin-in…

vagrant の SSH auth method: password で Authentication failure

vagrant up したら Authentication failure で先に進まなくなった。 default: SSH username: root default: SSH auth method: password default: Warning: Remote connection disconnect. Retrying... default: Warning: Remote connection disconnect. Retr…

golang のメソッド名の Must について

https://golang.org/pkg/regexp/#MustCompile ↑ こんな感じで Must が付いているものがある。 Must が付いているものは error を返す代わりに panic を発生させる。で上記の MustCompile() の説明文の一部が以下。 It simplifies safe initialization of glo…

golang の embedding について思ったこと

この記事は Go (その2) Advent Calendar 2016 の20日目の記事です。どーもpospomeです。(´・ω・`) GAE/GO の環境でサーバサイドエンジニアとして働いています。twitter では 実装パターン, DDD, golang, GCP についてつぶやくことが多いです。 同じような分…

fatal: could not read Username for 'https://github.com': terminal prompts disabled

プライベートリポジトリをgo getする方法 - lnrvrs ↑ これだった。 token を生成して、url instead of して終わり

パッケージの循環参照

循環参照についてです。 パッケージの循環参照 from pospome

goonで生成されるmemcacheのキー

goonで生成されるmemcacheのキーってどーやって作ってんのかな? と思って調べてみました。以下で生成している。 https://github.com/mjibson/goon/blob/master/goon.go#L71-L74Entityのkeyをエンコードして、「g2:」というプレフィクスを付けている。 ローカ…

golang + IntelliJ の import パス補完に _vendor, src が含まれる

気になったので調べてみたプロジェクトルートの指定方法が間違っている可能性が高い。以下のようなディレクトリ構成の場合 Myapp _vendor src myapp hanlder handler.goIntelliJ のプロジェクトルートを Myapp に指定すると、 _vendor とか src が含まれる。…

DataStore で Only ancestor queries are allowed inside transactions. のエラー

GCP

DataStore で以下のエラーが出た。 Only ancestor queries are allowed inside transactions. のエラーググると以下がヒット。 http://stackoverflow.com/questions/14397207/why-do-i-get-only-ancestor-queries-are-allowed-inside-transactions-error結論…

CQRSのコマンドでユーザーの入力エラーを返したい

結論から言うと、 DDDの.NET本の実装だとC#の async/await でイベント送信を非同期にしながらも、 同期的に戻り値返してたから、 これが正解なのかね・・・って感じです。 以下は色々調べた結果です。 過去にも似たような記事を書いたけど・・・・ http://d.…