gpt4 book ai didi

go - 在 VS Code 中找不到销售包

转载 作者:IT王子 更新时间:2023-10-29 02:09:50 27 4
gpt4 key购买 nike

使用 go go1.10.2 darwin/amd64 和 glide 0.13.1。依赖项位于 vendor 目录中。从命令行构建没有错误。在VS Code中查看代码时,显示如下错误:

Cannot find package "github.com/xxx/go-utility/log" in any of:

/usr/local/Cellar/go/1.10.2/libexec/src/github.com/xxx/go-utility/log (from $GOROOT) /Users/martin/go/src/github.com/xxx/go-utility/log (from $GOPATH)

终端和VS控制台都报告 GOPATH="/Users/martin/go"

如果我发出 go get 命令,我希望我可以使消息消失,但这违背了 vendor 目录的目的。

这是新计算机上的新安装。

我忘记了什么配置?

最佳答案

据 vscode-go github 问题报道1587我的解决方案是将以下内容添加到用户设置中(代码 > 首选项 > 设置)

{ "search.useIgnoreFiles": false }

关于go - 在 VS Code 中找不到销售包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50450452/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com