Go言語 - godefがインストールできない
Goのバージョン
$ go versiongo version go1.8 windows/amd64godefインストールエラー
vimのプラグインとかvscodeとかで、godefをインストールするようにいわれるけど、失敗する。下記のようなエラーがでる。
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/rogpeppe/godefgithub.com/rogpeppe/godef (download)# cd C:\Users\hoge\go\src\github.com\rogpeppe\godef; git pull --ff-onlyThere is no tracking information for the current branch.Please specify which branch you want to merge with.See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
package github.com/rogpeppe/godef: exit status 1github.com/rogpeppe/godef (download)# cd C:\Users\hoge\go\src\github.com\rogpeppe\godef; git pull --ff-onlyThere is no tracking information for the current branch.Please specify which branch you want to merge with.See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master解決策
$GOPATH/src/github.com/rogpeppe/godefが存在して、その中には.gitフォルダだけある。中途半端で止まってしまったのだろうか。
下記をしたら、プルできて色んなファイルが出てきた。
$ git pull origin master再度インストールしてみたら、エラーがなくなった。
$ go get github.com/rogpeppe/godef