2
0

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.

GO VSCodeで「シンボルの名前を変更」が出来ない

Last updated at Posted at 2018-08-08

実行環境

Code 1.25.1
go version go1.10.3 darwin/amd64

経緯

goで型名をまとめて変更しようと「シンボルの名前を変更 F2」を行ったら、

Rename failed: gorename: can't find package containing /Users/****/workspace/test/main.go
名前の変更を実行できませんでした。

と出てしまいました。

解決方法

ソースを$GOPATH以外の場所に置いていかららしい。
ソースのディレクトリを$GOPATH下のsrcの中に移動すればすんなり動いた。

解決のきっかけ

Gorename not working: Rename failed: gorename: can't find package containing #1641

I get it now : my code wasn't in the GOPATH ! It works now :)

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?