mirror of
https://github.com/golang/go
synced 2024-11-13 12:50:44 -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:
parent
44483133fd
commit
88dee90d6a
3
src/cmd/dist/buildtool.go
vendored
3
src/cmd/dist/buildtool.go
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user