]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: add old style build tags
authorCherry Mui <cherryyz@google.com>
Fri, 16 Sep 2022 23:54:51 +0000 (19:54 -0400)
committerCherry Mui <cherryyz@google.com>
Sat, 17 Sep 2022 02:56:44 +0000 (02:56 +0000)
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 <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/cmd/dist/exec_118.go
src/cmd/dist/exec_119.go

index 8688f0a01f83c0de4b33b2be1a894c12f8d3e19c..a1c3c64d9eab7d2ced97956f372be08cbeca18f2 100644 (file)
@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 
 //go:build !go1.19
+// +build !go1.19
 
 package main
 
index ed3a101c9f67d262884c5a098006868e51762eca..0b4baa0065b40b9a77fa265624acd9e06b01f5c3 100644 (file)
@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 
 //go:build go1.19
+// +build go1.19
 
 package main