LoginSignup
0
0

More than 3 years have passed since last update.

goland 設定go ModulesのEnable Vendoring Support automaticllyを外さないと

Last updated at Posted at 2020-07-01

問題

JetBrain goland中に
テストコードを実行する時に以下のエラーが発生されました。

./somefile.go:3:8: cannot find package "." in:
    /project/vendor/somepackage

パッケージ先がgo moduleに指定されたあるはずですが、vendorに指定されて、vendorにパーケージがないから、見つからないエラーが発生されます。

解決法

設定
->go
->go Modules
->Enable Vendoring Support automaticllyを外したら、正常に戻ります。

スクリーンショット 2020-07-01 16.03.26.png

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