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: go.mod is not detected #38397
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. |
Please post the literal text instead of an image, as the latter makes it much more difficult to read. The error text in the image states:
However the file tree shows a go.mod file next to main.go |
@mytea003: It looks like you've opened a directory above the |
How do I do it step by step?As you can see from the picture, I have added the project to the workspace. |
I think the folder is a subdirectory of your top-level workspace directory. You need to add folder explicitly to the workspace, which can be done by clicking the "File" menu and then selecting "Add Folder to Workspace". You can then select the |
I see. After testing, we got the expectation.But I thought it was strange.Adding the current go.mod directory directly to the workspace is expected.But according to my previous method, there are certain items that can also get the expected (hover message), so is this a BUG of gopls? |
That warning is meant to indicate that all of the features of |
thank you.Thank you again. |
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?
What did you expect to see?
Vscdoe in Windows can see the function information in third-party packages.
What did you see instead?
I confirm that I am using modules and in the directory go.mod.
The text was updated successfully, but these errors were encountered: