Skip to content

Commit 5f55cee

Browse files
committed
all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Not strictly necessary but will avoid spurious changes as files are edited. Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: I5b2b7d93424e828a3c5f76ae3f30ab825aca388e Reviewed-on: https://go-review.googlesource.com/c/net/+/294371 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>
1 parent 5f4716e commit 5f55cee

File tree

162 files changed

+166
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+166
-8
lines changed

context/context_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !go1.7
56
// +build !go1.7
67

78
package context

context/ctxhttp/ctxhttp_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !plan9
56
// +build !plan9
67

78
package ctxhttp

context/go17.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build go1.7
56
// +build go1.7
67

78
package context

context/go19.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build go1.9
56
// +build go1.9
67

78
package context

context/pre_go17.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !go1.7
56
// +build !go1.7
67

78
package context

context/pre_go19.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !go1.9
56
// +build !go1.9
67

78
package context

html/atom/gen.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
//go:generate go run gen.go

http/httpproxy/go19_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build go1.9
56
// +build go1.9
67

78
package httpproxy_test

http2/go111.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build go1.11
56
// +build go1.11
67

78
package http2

http2/h2i/h2i.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
56
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
67

78
/*

http2/not_go111.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !go1.11
56
// +build !go1.11
67

78
package http2

icmp/helper_posix.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
56
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
67

78
package icmp

icmp/listen_posix.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
56
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
67

78
package icmp

icmp/listen_stub.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows
56
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
67

78
package icmp

idna/idna10.0.0.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

idna/idna9.0.0.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

idna/tables10.0.0.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

idna/tables11.0.0.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

idna/tables12.0.0.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

idna/tables13.0.0.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

idna/tables9.0.0.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/iana/gen.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
//go:generate go run gen.go

internal/socket/cmsghdr.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
56
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
67

78
package socket

internal/socket/cmsghdr_bsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
56
// +build aix darwin dragonfly freebsd netbsd openbsd
67

78
package socket

internal/socket/cmsghdr_linux_32bit.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build (arm || mips || mipsle || 386) && linux
56
// +build arm mips mipsle 386
67
// +build linux
78

internal/socket/cmsghdr_linux_64bit.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
56
// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
67
// +build linux
78

internal/socket/cmsghdr_solaris_64bit.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build amd64
6-
// +build solaris
5+
//go:build amd64 && solaris
6+
// +build amd64,solaris
77

88
package socket
99

internal/socket/cmsghdr_stub.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
56
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
67

78
package socket

internal/socket/cmsghdr_unix.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
56
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
67

78
package socket

internal/socket/defs_aix.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/defs_darwin.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/defs_dragonfly.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/defs_freebsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/defs_linux.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/defs_netbsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/defs_openbsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/defs_solaris.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
// +godefs map struct_in_addr [4]byte /* in_addr */

internal/socket/error_unix.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
56
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
67

78
package socket

internal/socket/iovec_32bit.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build (arm || mips || mipsle || 386) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd)
56
// +build arm mips mipsle 386
67
// +build darwin dragonfly freebsd linux netbsd openbsd
78

internal/socket/iovec_64bit.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos)
56
// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
67
// +build aix darwin dragonfly freebsd linux netbsd openbsd zos
78

internal/socket/iovec_solaris_64bit.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build amd64
6-
// +build solaris
5+
//go:build amd64 && solaris
6+
// +build amd64,solaris
77

88
package socket
99

internal/socket/iovec_stub.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
56
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
67

78
package socket

internal/socket/mmsghdr_stub.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !aix && !linux && !netbsd
56
// +build !aix,!linux,!netbsd
67

78
package socket

internal/socket/mmsghdr_unix.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || linux || netbsd
56
// +build aix linux netbsd
67

78
package socket

internal/socket/msghdr_bsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
56
// +build aix darwin dragonfly freebsd netbsd openbsd
67

78
package socket

internal/socket/msghdr_bsdvar.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build aix || darwin || dragonfly || freebsd || netbsd
56
// +build aix darwin dragonfly freebsd netbsd
67

78
package socket

internal/socket/msghdr_linux_32bit.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build (arm || mips || mipsle || 386) && linux
56
// +build arm mips mipsle 386
67
// +build linux
78

internal/socket/msghdr_linux_64bit.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
56
// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
67
// +build linux
78

internal/socket/msghdr_solaris_64bit.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build amd64
6-
// +build solaris
5+
//go:build amd64 && solaris
6+
// +build amd64,solaris
77

88
package socket
99

0 commit comments

Comments
 (0)