LoginSignup
1
0

More than 1 year has passed since last update.

Go1.18がリリースされたので、早速Goのバージョンアップ

Last updated at Posted at 2022-03-16

2022年3月16日、Go1.18がリリースされました。
https://go.dev/blog/go1.18
待望のジェネリックス機能が使えるようになったので、早速Goのバージョンアップです。

ダウンロード

Go1.18が公開されたばかりなので、公式サイトからダウンロード・インストールします。
https://go.dev/dl/

デフォルト設定では、/usr/local/go配下にインストールされるので、パスを通しておきましょう。

~ $ which go
/usr/local/go/bin/go
~ $ go version
go version go1.18 darwin/amd64

アプリケーションでのGoのバージョンアップ

Goの標準モジュール管理go.modで管理されているアプリです。
次のコマンドでgo.modに記載されているGoのバージョンが上がったことを確認しています。

go mod tidy -go=1.18

これでアプリケーションが正常に動作することも確認しています。

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0