You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto-import couldn't work when I set "GO111MODULE": "auto", and editor always reported many import-erros, but go run main.go could work normally, so I tried to change the value of "GO111MODULE" to "on", and the import-errors was resolved, but auto-complete can't work on local package now.
Steps to reproduce the behavior:
Install go module and gopls
set "go.useLanguageServer": true and "GO111MODULE": "on",
Write a local package with a function, and import the package in other package, then auto-complete will not work.
Screenshots or recordings
The text was updated successfully, but these errors were encountered:
Are the controller package and the web/BookStore/* packages in the same module (/run/media/thepoy/软件/OneDrive - WULEL/code/go/src/web/alipay/go.mod), and is the workspace root /run/media/thepoy/软件/OneDrive - WULEL/code/go/src/web/alipay/ ?
If not, please see golang/go#36899 whether gopls is currently supporting your project setup.
Are the controller package and the web/BookStore/* packages in the same module (/run/media/thepoy/软件/OneDrive - WULEL/code/go/src/web/alipay/go.mod), and is the workspace root /run/media/thepoy/软件/OneDrive - WULEL/code/go/src/web/alipay/ ?
If not, please see golang/go#36899 whether gopls is currently supporting your project setup.
Thank you for your reply. I worked in GOPATH previous to this, not in the module root.
I tried to open workspace at the module root just now, and the auto-complete is working normally.
Thank you!
Please direct general questions to:
#vscode
channel in Gophers SlackPlease review the documentation before filing an issue.
Helpful pages include:
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env
to get the go development environment detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
Auto-import couldn't work when I set "GO111MODULE": "auto", and editor always reported many import-erros, but
go run main.go
could work normally, so I tried to change the value of "GO111MODULE" to "on", and the import-errors was resolved, but auto-complete can't work on local package now.Steps to reproduce the behavior:
Screenshots or recordings
The text was updated successfully, but these errors were encountered: