-
Notifications
You must be signed in to change notification settings - Fork 819
Closed
Labels
Milestone
Description
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
- Run
go version
to get version of Go from the VS Code integrated terminal.go version go1.18 linux/amd64
- Run
gopls -v version
to get version of Gopls from the VS Code integrated terminal.-
---------- golang.org/x/tools/gopls v0.8.2 golang.org/x/tools/[email protected] h1:+b7X2FDwmP7vxyYNOHe/ZFkecN5X8OtAgkNtuCr86wk= github.com/BurntSushi/[email protected] h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= github.com/google/[email protected] h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= golang.org/x/[email protected] h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/[email protected] h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/[email protected] h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= golang.org/x/[email protected] h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/[email protected] h1:vc69FAZNtE8951V+m/m3KwEZfMC599PHpNWdHuD7Awo= golang.org/x/[email protected] h1:9dMzk88fnONra7zrEalqkRMGa9jMGf9B5mdzhYVyI28= golang.org/x/[email protected] h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= honnef.co/go/[email protected] h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk= mvdan.cc/[email protected] h1:kTojdZo9AcEYbQYhGuLf/zszYthRdhDNDUi2JKTxas4= mvdan.cc/xurls/[email protected] h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc= go: go1.18
-
- Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.-
e18005f0f1b33c29e81d732535d8c0e47cafb0b5 x64
-
- Check your installed extensions to get the version of the VS Code Go extension
v0.32.0
- Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Tools
command.- n/a
Share 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"]
or gopls
prefixes.
Describe the bug
The current method to find the module name from the contents of go.mod
fails if the module name does not appear on the first line. That can happen, for example, if the first line is comment. By comparison, the go list -m
command does find the name.
Steps to reproduce the behavior:
- Create a new module, or use an existing module.
- Insert a comment
// Example comment
on the first line of thego.mod
file. - Save the
go.mod
file. - Open the Test Explorer.
- Notice the error diaog "Failed to resolve tests" appears.
- Inspect the "Go" output to find the message
Failed to resolve tests: TypeError: Cannot read properties of null (reading 'groups')
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.