aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cgo
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-02-19 18:35:10 -0500
committerRuss Cox <rsc@golang.org>2021-02-20 03:54:50 +0000
commitd4b26382342c98a95b85140b2863bc30c48edd68 (patch)
tree6ef0d77cc69a5a99a90fb528d083f6aca7448667 /src/runtime/cgo
parent0625460f79eed41039939f957baceaff5e269672 (diff)
downloadgo-d4b26382342c98a95b85140b2863bc30c48edd68.tar.gz
go-d4b26382342c98a95b85140b2863bc30c48edd68.zip
all: go fmt std cmd (but revert vendor)
Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: Ia0534360e4957e58cd9a18429c39d0e32a6addb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/294430 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/cgo')
-rw-r--r--src/runtime/cgo/callbacks_traceback.go1
-rw-r--r--src/runtime/cgo/dragonfly.go1
-rw-r--r--src/runtime/cgo/freebsd.go1
-rw-r--r--src/runtime/cgo/linux.go1
-rw-r--r--src/runtime/cgo/mmap.go1
-rw-r--r--src/runtime/cgo/netbsd.go1
-rw-r--r--src/runtime/cgo/openbsd.go1
-rw-r--r--src/runtime/cgo/setenv.go1
-rw-r--r--src/runtime/cgo/sigaction.go1
9 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/cgo/callbacks_traceback.go b/src/runtime/cgo/callbacks_traceback.go
index cdadf9e66f..7302c1eedf 100644
--- a/src/runtime/cgo/callbacks_traceback.go
+++ b/src/runtime/cgo/callbacks_traceback.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin || linux
// +build darwin linux
package cgo
diff --git a/src/runtime/cgo/dragonfly.go b/src/runtime/cgo/dragonfly.go
index d6d69187b8..cfa6fe86e2 100644
--- a/src/runtime/cgo/dragonfly.go
+++ b/src/runtime/cgo/dragonfly.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build dragonfly
// +build dragonfly
package cgo
diff --git a/src/runtime/cgo/freebsd.go b/src/runtime/cgo/freebsd.go
index 5c9ddbdc71..d56702ec70 100644
--- a/src/runtime/cgo/freebsd.go
+++ b/src/runtime/cgo/freebsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build freebsd
// +build freebsd
package cgo
diff --git a/src/runtime/cgo/linux.go b/src/runtime/cgo/linux.go
index 76c0192c20..070d531bee 100644
--- a/src/runtime/cgo/linux.go
+++ b/src/runtime/cgo/linux.go
@@ -5,6 +5,7 @@
// Linux system call wrappers that provide POSIX semantics through the
// corresponding cgo->libc (nptl) wrappers for various system calls.
+//go:build linux
// +build linux
package cgo
diff --git a/src/runtime/cgo/mmap.go b/src/runtime/cgo/mmap.go
index 00fb7fced6..347ae6b363 100644
--- a/src/runtime/cgo/mmap.go
+++ b/src/runtime/cgo/mmap.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (linux && amd64) || (linux && arm64)
// +build linux,amd64 linux,arm64
package cgo
diff --git a/src/runtime/cgo/netbsd.go b/src/runtime/cgo/netbsd.go
index 74d0aed014..7e17d1fcd2 100644
--- a/src/runtime/cgo/netbsd.go
+++ b/src/runtime/cgo/netbsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build netbsd
// +build netbsd
package cgo
diff --git a/src/runtime/cgo/openbsd.go b/src/runtime/cgo/openbsd.go
index 81c73bf399..f6215613c3 100644
--- a/src/runtime/cgo/openbsd.go
+++ b/src/runtime/cgo/openbsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build openbsd
// +build openbsd
package cgo
diff --git a/src/runtime/cgo/setenv.go b/src/runtime/cgo/setenv.go
index 6495fcb5f8..e6e8040ae0 100644
--- a/src/runtime/cgo/setenv.go
+++ b/src/runtime/cgo/setenv.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package cgo
diff --git a/src/runtime/cgo/sigaction.go b/src/runtime/cgo/sigaction.go
index 076fbc1a0a..ee63ea4c09 100644
--- a/src/runtime/cgo/sigaction.go
+++ b/src/runtime/cgo/sigaction.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (linux && amd64) || (freebsd && amd64) || (linux && arm64)
// +build linux,amd64 freebsd,amd64 linux,arm64
package cgo