]> Cypherpunks repositories - gostls13.git/commitdiff
all: manual fixups for //go:build vs // +build
authorRuss Cox <rsc@golang.org>
Thu, 28 Oct 2021 17:51:39 +0000 (13:51 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 28 Oct 2021 22:38:00 +0000 (22:38 +0000)
Update many generators, also handle files that were not part of the
standard build during 'go fix' in CL 344955.

Fixes #41184.

Change-Id: I1edc684e8101882dcd11f75c6745c266fccfe9e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/359476
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
21 files changed:
src/crypto/elliptic/gen_p256_table.go
src/internal/goarch/gengoarch.go
src/internal/goos/gengoos.go
src/internal/syscall/windows/exec_windows_test.go
src/internal/syscall/windows/mksyscall.go
src/internal/syscall/windows/registry/export_test.go
src/internal/syscall/windows/registry/key.go
src/internal/syscall/windows/registry/mksyscall.go
src/internal/syscall/windows/registry/registry_test.go
src/internal/syscall/windows/registry/syscall.go
src/internal/syscall/windows/registry/value.go
src/internal/syscall/windows/sysdll/sysdll.go
src/runtime/asan/asan.go
src/runtime/mkduff.go
src/runtime/mkpreempt.go
src/runtime/msan/msan.go
src/runtime/wincallback.go
src/syscall/js/export_test.go
src/syscall/js/func.go
src/syscall/js/js.go
src/syscall/js/js_test.go

index 54aafa2c3862439d677d68a4db32d4852e8ebbf1..367bd4b67d9248cac863f63a01041a0f359c4320 100644 (file)
@@ -26,7 +26,6 @@ func main() {
 // Generated by gen_p256_table.go. DO NOT EDIT.
 
 //go:build amd64 || arm64
-// +build amd64 arm64
 
 package elliptic
 
index d146cc5bc90a754d602a778d5b6621869e315253..3c706e04ad0cc5a56bebe06408115c27e20c321e 100644 (file)
@@ -39,8 +39,7 @@ func main() {
                }
                var buf bytes.Buffer
                fmt.Fprintf(&buf, "// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT.\n\n")
-               fmt.Fprintf(&buf, "//go:build %s\n", target)
-               fmt.Fprintf(&buf, "// +build %s\n\n", target) // must explicitly include target for bootstrapping purposes
+               fmt.Fprintf(&buf, "//go:build %s\n", target) // must explicitly include target for bootstrapping purposes
                fmt.Fprintf(&buf, "package goarch\n\n")
                fmt.Fprintf(&buf, "const GOARCH = `%s`\n\n", target)
                for _, goarch := range goarches {
index f8ddfcc7ff0ac4410cb297890858ed4e714a2251..1b62503fd007427fcfcc359edb4ebf900ce87fa2 100644 (file)
@@ -51,7 +51,6 @@ func main() {
                var buf bytes.Buffer
                fmt.Fprintf(&buf, "// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.\n\n")
                fmt.Fprintf(&buf, "//go:build %s\n", strings.Join(tags, " && "))
-               fmt.Fprintf(&buf, "// +build %s\n\n", strings.Join(tags, ","))
                fmt.Fprintf(&buf, "package goos\n\n")
                fmt.Fprintf(&buf, "const GOOS = `%s`\n\n", target)
                for _, goos := range gooses {
index 0db626636e95d1308cd6defb0937cb4a60b1da05..3311da5474164620b6fa65e00084f9c453df53c1 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build windows
-// +build windows
 
 package windows_test
 
index 39f745db7a3d40bb38e386ae30d1b201ae9f06e3..81f08c627e6496ac38a316947a56d8893a4e5053 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build generate
-// +build generate
 
 package windows
 
index d02d93f287522f62ae766b7f7a11fbcdb34bf2bd..7f1ac70e8fa01cf1b18e36edda1afde3ce61ca6f 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build windows
-// +build windows
 
 package registry
 
index ebe73a2e02468336a514ce1f5d95a89b6ae456ba..ba5c292c5eca7122ead31db0be92d4283b97275d 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build windows
-// +build windows
 
 // Package registry provides access to the Windows registry.
 //
index 0a007df7ccd08322d0650c1e0612a41b6e3d7b38..0e0b4210d58a0d25f3a093d28c0f7c2df1be08ad 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build generate
-// +build generate
 
 package registry
 
index 69b84e1c4c5f995f7804ac086f71c27708efb3ac..134b5450fcace93772723bcb7e561dfdd147ffb3 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build windows
-// +build windows
 
 package registry_test
 
index bb612793613f571a1250a417a2773c1f782fff73..cb315adadedf728a3f356bbc09d6f31c0e242908 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build windows
-// +build windows
 
 package registry
 
index e1fc99c40d4cdd8cd57bf15ef667939720a277b2..025574015f69e8ac7bd901268a7330bc07d54a8d 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build windows
-// +build windows
 
 package registry
 
index 61b998e4cfc3d164b8f224d7264ee68686396efb..e79fd19edc0ebb3a3907d4302575e17a550264b7 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build windows
-// +build windows
 
 // Package sysdll is an internal leaf package that records and reports
 // which Windows DLL names are used by Go itself. These DLLs are then
index 40ebf96824029395ee890bb554b255129967e2b5..ac71466b71d46bf8affb03ff0c3dee3bb82ec7f0 100644 (file)
@@ -3,9 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build asan && linux && (arm64 || amd64)
-// +build asan
-// +build linux
-// +build arm64 amd64
 
 package asan
 
index d05158975fc44bc29bb157c622c1789a418763b0..e8a85702c6088bdd1fc0ff746189f10e2e984fe8 100644 (file)
@@ -179,7 +179,6 @@ func copyARM64(w io.Writer) {
 func tagsPPC64x(w io.Writer) {
        fmt.Fprintln(w)
        fmt.Fprintln(w, "//go:build ppc64 || ppc64le")
-       fmt.Fprintln(w, "// +build ppc64 ppc64le")
        fmt.Fprintln(w)
 }
 
@@ -207,7 +206,6 @@ func copyPPC64x(w io.Writer) {
 func tagsMIPS64x(w io.Writer) {
        fmt.Fprintln(w)
        fmt.Fprintln(w, "//go:build mips64 || mips64le")
-       fmt.Fprintln(w, "// +build mips64 mips64le")
        fmt.Fprintln(w)
 }
 
index acfb518d106803f3197cbafdd5029e62463e301d..d662e73813ff8d19c20649ed7326c99c15acadd3 100644 (file)
@@ -123,7 +123,6 @@ func header(arch string) {
        if beLe[arch] {
                base := arch[:len(arch)-1]
                fmt.Fprintf(out, "//go:build %s || %sle\n", base, base)
-               fmt.Fprintf(out, "// +build %s %sle\n\n", base, base)
        }
        fmt.Fprintf(out, "#include \"go_asm.h\"\n")
        fmt.Fprintf(out, "#include \"textflag.h\"\n\n")
index 9908a8ec22170fdf7782407e25247b909a25c56c..f1bf4e1065cf96c2fc40c8a51afb3f29c252e8d0 100644 (file)
@@ -3,9 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build msan && linux && (amd64 || arm64)
-// +build msan
-// +build linux
-// +build amd64 arm64
 
 package msan
 
index ca9965979fd30748685daba9a2cc6b67885937bc..442a98470837b84a7b0b5c1971ccce6d5eccaa3a 100644 (file)
@@ -22,7 +22,6 @@ func genasm386Amd64() {
        buf.WriteString(`// Code generated by wincallback.go using 'go generate'. DO NOT EDIT.
 
 //go:build 386 || amd64
-// +build 386 amd64
 
 // runtime·callbackasm is called by external code to
 // execute Go implemented callback function. It is not
index 4bd9c5d595eb72a8a186de52d2beaf80e9aa7b9d..fb61daea7cea00f4732496c8a0a344e73ccbe345 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build js && wasm
-// +build js,wasm
 
 package js
 
index dde1e6810023b0dc2cd866729cf68c06ead3a78f..77fb9e66ca91f2d62be29984627bec1e642da0f3 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build js && wasm
-// +build js,wasm
 
 package js
 
index 0da0ddfa0fbbd1baa7784e02f186e63ddf984e0e..d80d5d63de2a5ab9ecfb1ebff8c8aeff07b4ccab 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build js && wasm
-// +build js,wasm
 
 // Package js gives access to the WebAssembly host environment when using the js/wasm architecture.
 // Its API is based on JavaScript semantics.
index 8088a897f60716ffb2f439f177fc7fa4372b99ce..fa8c782459c42c4a4da15012af31fa2b7a69e99c 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build js && wasm
-// +build js,wasm
 
 // To run these tests:
 //