UbuntuにGoをインストールする

提供: Ubuntu入門
2015年2月28日 (土) 13:48時点におけるDaemon (トーク | 投稿記録)による版 (概要)

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索
スポンサーリンク

UbuntuでGoを利用するには、golang をインストールします。

読み方

golang
ごーらんぐ
Go
ごー

概要

Go言語で書かれたソースコードをコンパイルするには、Goコンパイラ(goコマンド)が必要です。UbuntuでGoコンパイラを使用するには、golangパッケージをインストールします。

インストール

$ sudo apt install golang

使い方

コマンドラインオプション

Go is a tool for managing Go source code.
 
Usage:
 
	go command [arguments]
 
The commands are:
 
    build       compile packages and dependencies
    clean       remove object files
    env         print Go environment information
    fix         run go tool fix on packages
    fmt         run gofmt on package sources
    get         download and install packages and dependencies
    install     compile and install packages and dependencies
    list        list packages
    run         compile and run Go program
    test        test packages
    tool        run specified go tool
    version     print Go version
    vet         run go tool vet on packages
 
Use "go help [command]" for more information about a command.
 
Additional help topics:
 
    c           calling between Go and C
    gopath      GOPATH environment variable
    importpath  import path syntax
    packages    description of package lists
    testflag    description of testing flags
    testfunc    description of testing functions
 
Use "go help [topic]" for more information about that topic.

バージョンの確認方法

$ go version
go version go1.2.1 linux/amd64

関連項目




スポンサーリンク