LoginSignup
1

More than 5 years have passed since last update.

Visual Studio CodeでGo開発環境を作成したときのパス設定

Last updated at Posted at 2017-06-08

windows7のVisual Studio CodeでGo開発環境を作った際に、gitやgopathのパスがうまく通っておらず困ったのでメモ。

環境

  • windows7
  • Visual Stadio Code 1.12

つまづきポイント

  • goファイルをいじっているとgo関連パッケージのインストールが促されるので、促されるままインストールしようとしたが exec: "git": executable file not found in %PATH% という感じで怒られた

  • gitのパスを通して関連パッケージを進められるまま入れていたら、文字入力してgolintか何か走る度にコマンドプロンプトが開くという状態になってしまった。

対応

ファイル > 基本設定 > 設定 > から設定ファイルを開き、ユーザ設定に下記を追加

  "git.path": "C:\\Program Files\\Git\\bin\\git.exe",
  "go.gopath": "C:\\gopath\\bin"

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
1