diff --git a/tool/gocross/toolchain.go b/tool/gocross/toolchain.go index 2eb675861..8086d9697 100644 --- a/tool/gocross/toolchain.go +++ b/tool/gocross/toolchain.go @@ -43,7 +43,11 @@ findTopLevel: } } - return readRevFile(filepath.Join(d, "go.toolchain.rev")) + revFile := "go.toolchain.rev" + if os.Getenv("TS_GO_NEXT") == "1" { + revFile = "go.toolchain.next.rev" + } + return readRevFile(filepath.Join(d, revFile)) } func readRevFile(path string) (string, error) {