]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: do not rewrite "any" -> "interface{}"
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 30 Aug 2024 17:26:37 +0000 (00:26 +0700)
committerGopher Robot <gobot@golang.org>
Fri, 30 Aug 2024 20:11:04 +0000 (20:11 +0000)
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>
src/cmd/dist/buildtool.go

index d1094f49fd0239022d64e82826551286a7aecb92..09fa44e42919f853434c1838405cc821e3315ca1 100644 (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