-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed as not planned
Closed as not planned
Copy link
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
Go version
go version go1.24.0 darwin/arm64
Output of go env
in your module/workspace:
not relevant
What did you do?
Given this code snippet:
env := append([]string{}, os.Environ()...)
What did you see happen?
Running go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./...
against it changes it to unexpected
env := os.Environ()
What did you expect to see?
env := maps.Clone(os.Environ())
Metadata
Metadata
Assignees
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.