LoginSignup
3
3

More than 5 years have passed since last update.

Goの開発環境を10分で作る

Posted at
  • Mac OSX 10.11.4
  • homebrewは使える前提

Go本体のインストール

$ brew install go

$GOPATH,$PATHの設定

(どこでもよい)

$ mkdir -p $HOME/go

.bash_profile .zshrc などに書く。

GOROOT=/usr/local/go
export GOROOT
GOPATH=$HOME/go
export GOPATH
export GO15VENDOREXPERIMENT=0
PATH=$PATH:$GOROOT/bin:$GOPATH/bin
$ source .bash_profile

確認

$ go version
go version go1.6.2 darwin/amd64

go get してみる

$ go get -u github.com/tools/godep
$ godep version
godep v62 (darwin/amd64/go1.6.2)

実体が配置される場所

$ cd $GOPATH/src/github.com/tools/godep
3
3
0

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
3
3