简体   繁体   English

当有多个同名的package时,如何在vscode中显示golang package完整路径?

[英]How to display golang package full path in vscode when there are multiple package with same name?

similar issue with How to force VSCode to require manual choice where goimports match multiple packages with same name?如何强制 VSCode 要求手动选择 goimports 匹配多个具有相同名称的包的类似问题?

I have two package under different directories github.com/myproject/mytest1/mytest github.com/myproject/mytest2/mytest我在不同目录下有两个 package github.com/myproject/mytest1/mytest github.com/myproject/mytest2/mytest

When I type "mytest", the autocomplete gives me the suggestion with two "mytest".当我输入“mytest”时,自动完成功能会给我两个“mytest”的建议 I can't tell which directory the two "mytest" belong to.我不知道这两个“mytest”属于哪个目录。 Is there a way to display the full path of package?有没有办法显示 package 的完整路径?

On a Mac, when you see the list with choices, press ^ + Space .在 Mac 上,当您看到带有选项的列表时,按^ + Space That will show the full package path as you move from one package to the other.当您从一个 package 移动到另一个时,这将显示完整的 package 路径。

Use arrows to move selection in the autocomple window.使用箭头在自动完成 window 中移动选择。 VS 代码中的自动完成

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM