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
Run code -v or code-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 the go.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.
The text was updated successfully, but these errors were encountered:
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.go version go1.18 linux/amd64
gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.v0.32.0
Go: Locate Configured Go Tools
command.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"]
orgopls
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, thego list -m
command does find the name.Steps to reproduce the behavior:
// Example comment
on the first line of thego.mod
file.go.mod
file.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.
The text was updated successfully, but these errors were encountered: