0
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 3 years have passed since last update.

vim-goでlinter実行時に"cannot import absolute path"

Posted at

問い

vim-goで.vimrcにlet g:go_metalinter_autosave = 1と設定していると保存時に自動でlinterを実行してくれるが、ここで次のようなエラーが出た。

Can't run linter goanalysis_metalinter: asmdecl: analysis skipped: errors in package: [-: import \"/absolute/path/to/project\": cannot import absolute path]

答え

GOPATHにないプロジェクトをimportできないことが原因だった。次を実行して解決。

go mod init github.com/name/project
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?