golangに関するtyheのブックマーク (2)

  • go testの時だけ時刻を固定する - newmo 技術ブログ

    はじめに こんにちは。newmoでソフトウェアエンジニアをやっている@tenntennです。 newmoには2024年8月に入社しました。この記事を書いているのは2024年9月なので、入社してだいたい1ヶ月ちょっとが経過したところです。 なお、筆者が入社した経緯などは次の記事を読んでください。 note.com 入社した当初、newmoのバックエンドコードのコードを眺めていると、次のように宣言された関数を見つけました。 func Now(_ context.Context) time.Time { return time.Now().In(time.UTC) } 単にtime.Now関数を呼び出して、LocationをUTCに設定しているだけです。 しかも、引数はブランク識別子になっているので使用していません。 しかし、筆者はこれを見て、これは後々のことを考えているなと感心しました。 ちな

    go testの時だけ時刻を固定する - newmo 技術ブログ
  • The State of Go

    The State of Go Where we are in February 2015 Andrew Gerrand Go 1.4 Released in December 2014. A few important things: Android support. Canonical import paths. The go generate command. Lots of behind-the-scenes work: Prep work for new garbage collector. Prep work for C to Go tool chain conversion. Source tree re-organization. go.dev/doc/go1.4 2 Transition to Git 3 Transition to Git In December we

  • 1