- 公式ドキュメント
- 日本語翻訳
https://github.com/golang/go/wiki/Ubuntu
UbuntuのようなDebianベースのシステムには他にもいくつかのオプションがあります。これらのパッケージはGoプロジェクトによって作成されたものではなく、サポートされていませんが、役立つ場合があります。
最新のバージョンに更新します。
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
インストールします。
sudo apt install golang
バージョン確認。
go version
- プロジェクトフォルダを作成します。
go mod init "モジュール名"
を実行します。