LoginSignup

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

More than 5 years have passed since last update.

Go 開発環境の構築(簡易版)

Last updated at Posted at 2016-01-28

Microsoft Windows

インストール

  • Downloads ページから Microsoft Windows 用のインストーラをダウンロードしてインストールします
    • 64-bit がデフォルトで 32-bit は Stable versions の下にある 「~.windows-386.msi」になります

GOPATH 設定

Windows ユーザ名が hogehoge であることを想定しています

  1. コマンドプロンプトを開く
  2. cd %HOMEPATH%
  3. mkdir godev
  4. setx GOPATH "%HOMEPATH%¥godev"
  5. コマンドプロンプトを閉じる

以後は godev フォルダに Go のソースコードを保存します

Apple OS X

インストール

  • Downloads ページから Apple OS X 用のインストーラをダウンロードしてインストールします

GOPATH 設定

OS X ユーザ名が hogehoge であることを想定しています

  1. ターミナルを開く
  2. mkdir ~/godev
  3. echo 'export GOPATH=$HOME/godev' >> ~/.bash_profile
  4. echo 'export PATH=$PATH:$GOPATH/bin' >> ~/.bash_profile
  5. source ~/.bash_profile

以後は godev フォルダに Go のソースコードを保存します

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