From 1c19c5602bc5d5f54463b1a0133965fa25ebcd56 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Fri, 16 Sep 2022 19:54:51 -0400 Subject: [PATCH] cmd/dist: add old style build tags If one (accidentally) uses Go 1.16 as bootstrap toolchain, we want it to print the error found packages main (build.go) and building_Go_requires_Go_1_17_or_later (notgo117.go) But because some files lack old style build tags, Go 1.16 instead prints //go:build comment without // +build comment Add the build tags to make the error message work. Change-Id: Iaa9b3c12e71842bb40f8687b2fda2cc4cb15b113 Reviewed-on: https://go-review.googlesource.com/c/go/+/431057 Run-TryBot: Cherry Mui TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- src/cmd/dist/exec_118.go | 1 + src/cmd/dist/exec_119.go | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cmd/dist/exec_118.go b/src/cmd/dist/exec_118.go index 8688f0a01f..a1c3c64d9e 100644 --- a/src/cmd/dist/exec_118.go +++ b/src/cmd/dist/exec_118.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. //go:build !go1.19 +// +build !go1.19 package main diff --git a/src/cmd/dist/exec_119.go b/src/cmd/dist/exec_119.go index ed3a101c9f..0b4baa0065 100644 --- a/src/cmd/dist/exec_119.go +++ b/src/cmd/dist/exec_119.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. //go:build go1.19 +// +build go1.19 package main