35
33

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacでGoの環境構築

Posted at

[WIP] MacでGo 1.11の環境構築

たぶんこれでイケるはず(`・ω・´)

確認した環境

  • macOS High Sierra 10.13.6
  • Homebrew 1.7.7

Go周りの初期インストール

  • Goのインストール
$ brew install go
$ go version
go version go1.11.1 darwin/amd64
  • Pathの設定
$ mkdir $HOME/go
$ echo 'export GOPATH=$(go env GOPATH)' >> ~/.bash_profile
$ echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bash_profile
$ source ~/.bash_profile
  • Pathの確認
$ go env GOPATH
/Users/[自分のPCユーザ名]/go
$ go env GOROOT
/usr/local/Cellar/go/1.11.1/libexec
  • 自分のgithubユーザのディレクトリを作成
$ mkdir -p $GOPATH/src/github.com/[githubのユーザ名]

例) mkdir -p $GOPATH/src/github.com/yukinagae

vscodeの設定

Visual Studio Codeをインストールし, 以下のgo拡張をインストールする.

35
33
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
35
33

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?