1
0
mirror of https://github.com/golang/go synced 2024-11-22 03:04:41 -07:00

cmd/dist: do not rewrite "any" -> "interface{}"

Since go1.22, generic can now be used when building bootstrap toolchain.

Updates #54265
Updates #64751

Change-Id: I93209fc23c92114d37ef36787ea2b520de3ed89d
Reviewed-on: https://go-review.googlesource.com/c/go/+/609915
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Cuong Manh Le 2024-08-31 00:26:37 +07:00 committed by Gopher Robot
parent 44483133fd
commit 88dee90d6a

View File

@ -312,9 +312,6 @@ var (
func bootstrapFixImports(srcFile string) string {
text := readfile(srcFile)
if !strings.Contains(srcFile, "/cmd/") && !strings.Contains(srcFile, `\cmd\`) {
text = regexp.MustCompile(`\bany\b`).ReplaceAllString(text, "interface{}")
}
lines := strings.SplitAfter(text, "\n")
inBlock := false
inComment := false