Open Sc00bz opened 3 months ago
By go clean
, do you mean the Go command's clean
subcommand, or something else?
(In other words, the step 4 means, run go clean
from the terminal?)
In other words, the step 4 means, run
go clean
from the terminal?
Yes, and while being in the folder blah.go
.
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.22.0 windows/amd64 * Run `gopls -v version` to get version of Gopls from _the VS Code integrated terminal_. - golang.org/x/tools/gopls v0.16.1 * Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders. - 1.92.2 * Check your installed extensions to get the version of the VS Code Go extension - v0.42.0
Describe the bug
If you name your folder
blah.go
and have you code in a file calledblah.go
, then rungo clean
it will deleteblah.go/blah.go
.Steps to reproduce the behavior:
blah.go
blah.go/blah.go
with contents "package main"blah.go/go.mod
with contents "module blah go 1.22"go clean
blah.go/blah.go
is gone.Fix
go clean
should check if folder name ends in.go
before deleting a file named the same as the parent folder.