-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: undeclared name error for name declared in different file #34440
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
Ok after reading this: https://golang.org/doc/code.html, I have realized that I was doing everything wrong. Though I still cannot find |
To get gopls, |
Actually, to install |
running |
You will want to move |
|
@MatteoGioioso: Just wanted to follow up here - are you still experiencing this issue? |
@stamblerre Unfortunately I am still experiencing this issue. However I have no problem with the development. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
VSCode
Ubuntu: 18.04.3 LTS
customer.go
main.go
When I try to troubleshoot and I run:
gopls -rpc.trace -v check /path/to/file.go
I receive
gopls command not found
, I then try to installgopls
by running:GO111MODULE=on go get golang.org/x/tools/gopls@latest
, and the output is:go: finding golang.org/x/tools latest
and then it exits.After restarting the terminal I still get
gopls command not found
I have restarted my editor several times and also I have restarted
languageServer
What did you expect to see?
Nothing since running the application produce no error
What did you see instead?
undeclared name: Customer
The text was updated successfully, but these errors were encountered: