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>
diff --git a/context/context_test.go b/context/context_test.go
index 6284413..e7bf0ac 100644
--- a/context/context_test.go
+++ b/context/context_test.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 !go1.7
 // +build !go1.7
 
 package context
diff --git a/context/ctxhttp/ctxhttp_test.go b/context/ctxhttp/ctxhttp_test.go
index c4339c4..21f7599 100644
--- a/context/ctxhttp/ctxhttp_test.go
+++ b/context/ctxhttp/ctxhttp_test.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 !plan9
 // +build !plan9
 
 package ctxhttp
diff --git a/context/go17.go b/context/go17.go
index d20f52b..344bd14 100644
--- a/context/go17.go
+++ b/context/go17.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 go1.7
 // +build go1.7
 
 package context
diff --git a/context/go19.go b/context/go19.go
index d88bd1d..64d31ec 100644
--- a/context/go19.go
+++ b/context/go19.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 go1.9
 // +build go1.9
 
 package context
diff --git a/context/pre_go17.go b/context/pre_go17.go
index 0f35592..5270db5 100644
--- a/context/pre_go17.go
+++ b/context/pre_go17.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 !go1.7
 // +build !go1.7
 
 package context
diff --git a/context/pre_go19.go b/context/pre_go19.go
index b105f80..1f97153 100644
--- a/context/pre_go19.go
+++ b/context/pre_go19.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 !go1.9
 // +build !go1.9
 
 package context
diff --git a/html/atom/gen.go b/html/atom/gen.go
index 7fc08a2..5b0aaf7 100644
--- a/html/atom/gen.go
+++ b/html/atom/gen.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 ignore
 // +build ignore
 
 //go:generate go run gen.go
diff --git a/http/httpproxy/go19_test.go b/http/httpproxy/go19_test.go
index 2117ca5..5f6e3d7 100644
--- a/http/httpproxy/go19_test.go
+++ b/http/httpproxy/go19_test.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 go1.9
 // +build go1.9
 
 package httpproxy_test
diff --git a/http2/go111.go b/http2/go111.go
index 3a13101..5bf62b0 100644
--- a/http2/go111.go
+++ b/http2/go111.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 go1.11
 // +build go1.11
 
 package http2
diff --git a/http2/h2i/h2i.go b/http2/h2i/h2i.go
index 26143b3..4fa243f 100644
--- a/http2/h2i/h2i.go
+++ b/http2/h2i/h2i.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 || windows
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
 
 /*
diff --git a/http2/not_go111.go b/http2/not_go111.go
index 161bca7..cc0baa8 100644
--- a/http2/not_go111.go
+++ b/http2/not_go111.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 !go1.11
 // +build !go1.11
 
 package http2
diff --git a/icmp/helper_posix.go b/icmp/helper_posix.go
index 75e7557..6c3ebfa 100644
--- a/icmp/helper_posix.go
+++ b/icmp/helper_posix.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 || windows
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
 
 package icmp
diff --git a/icmp/listen_posix.go b/icmp/listen_posix.go
index 327abf8..bcad739 100644
--- a/icmp/listen_posix.go
+++ b/icmp/listen_posix.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 || windows
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
 
 package icmp
diff --git a/icmp/listen_stub.go b/icmp/listen_stub.go
index 3acd91d..bc9343c 100644
--- a/icmp/listen_stub.go
+++ b/icmp/listen_stub.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 && !windows
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
 
 package icmp
diff --git a/idna/idna10.0.0.go b/idna/idna10.0.0.go
index a98a31f..7e69ee1 100644
--- a/idna/idna10.0.0.go
+++ b/idna/idna10.0.0.go
@@ -4,6 +4,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build go1.10
 // +build go1.10
 
 // Package idna implements IDNA2008 using the compatibility processing
diff --git a/idna/idna9.0.0.go b/idna/idna9.0.0.go
index 8842146..7c74563 100644
--- a/idna/idna9.0.0.go
+++ b/idna/idna9.0.0.go
@@ -4,6 +4,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !go1.10
 // +build !go1.10
 
 // Package idna implements IDNA2008 using the compatibility processing
diff --git a/idna/tables10.0.0.go b/idna/tables10.0.0.go
index 54fddb4..d1d62ef 100644
--- a/idna/tables10.0.0.go
+++ b/idna/tables10.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.10 && !go1.13
 // +build go1.10,!go1.13
 
 package idna
diff --git a/idna/tables11.0.0.go b/idna/tables11.0.0.go
index 8ce0811..167efba 100644
--- a/idna/tables11.0.0.go
+++ b/idna/tables11.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.13 && !go1.14
 // +build go1.13,!go1.14
 
 package idna
diff --git a/idna/tables12.0.0.go b/idna/tables12.0.0.go
index f39f0cb..ab40f7b 100644
--- a/idna/tables12.0.0.go
+++ b/idna/tables12.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.14 && !go1.16
 // +build go1.14,!go1.16
 
 package idna
diff --git a/idna/tables13.0.0.go b/idna/tables13.0.0.go
index e8c7a36..390c5e5 100644
--- a/idna/tables13.0.0.go
+++ b/idna/tables13.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build go1.16
 // +build go1.16
 
 package idna
diff --git a/idna/tables9.0.0.go b/idna/tables9.0.0.go
index 8b65fa1..4074b53 100644
--- a/idna/tables9.0.0.go
+++ b/idna/tables9.0.0.go
@@ -1,5 +1,6 @@
 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
 
+//go:build !go1.10
 // +build !go1.10
 
 package idna
diff --git a/internal/iana/gen.go b/internal/iana/gen.go
index 2a7661c..34f0f7e 100644
--- a/internal/iana/gen.go
+++ b/internal/iana/gen.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 ignore
 // +build ignore
 
 //go:generate go run gen.go
diff --git a/internal/socket/cmsghdr.go b/internal/socket/cmsghdr.go
index 0cde35a..4bdaaaf 100644
--- a/internal/socket/cmsghdr.go
+++ b/internal/socket/cmsghdr.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package socket
diff --git a/internal/socket/cmsghdr_bsd.go b/internal/socket/cmsghdr_bsd.go
index 14dbb3a..0d30e0a 100644
--- a/internal/socket/cmsghdr_bsd.go
+++ b/internal/socket/cmsghdr_bsd.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 || netbsd || openbsd
 // +build aix darwin dragonfly freebsd netbsd openbsd
 
 package socket
diff --git a/internal/socket/cmsghdr_linux_32bit.go b/internal/socket/cmsghdr_linux_32bit.go
index bac6681..623cf30 100644
--- a/internal/socket/cmsghdr_linux_32bit.go
+++ b/internal/socket/cmsghdr_linux_32bit.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 (arm || mips || mipsle || 386) && linux
 // +build arm mips mipsle 386
 // +build linux
 
diff --git a/internal/socket/cmsghdr_linux_64bit.go b/internal/socket/cmsghdr_linux_64bit.go
index 27be0ef..1ba4310 100644
--- a/internal/socket/cmsghdr_linux_64bit.go
+++ b/internal/socket/cmsghdr_linux_64bit.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 (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
 // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
 // +build linux
 
diff --git a/internal/socket/cmsghdr_solaris_64bit.go b/internal/socket/cmsghdr_solaris_64bit.go
index 7dedd43..d3dbe1b 100644
--- a/internal/socket/cmsghdr_solaris_64bit.go
+++ b/internal/socket/cmsghdr_solaris_64bit.go
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build amd64
-// +build solaris
+//go:build amd64 && solaris
+// +build amd64,solaris
 
 package socket
 
diff --git a/internal/socket/cmsghdr_stub.go b/internal/socket/cmsghdr_stub.go
index 83c35ec..1d9f2ed 100644
--- a/internal/socket/cmsghdr_stub.go
+++ b/internal/socket/cmsghdr_stub.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 && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package socket
diff --git a/internal/socket/cmsghdr_unix.go b/internal/socket/cmsghdr_unix.go
index c2b2b65..aa1b062 100644
--- a/internal/socket/cmsghdr_unix.go
+++ b/internal/socket/cmsghdr_unix.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 socket
diff --git a/internal/socket/defs_aix.go b/internal/socket/defs_aix.go
index 90090d0..e6dea40 100644
--- a/internal/socket/defs_aix.go
+++ b/internal/socket/defs_aix.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_darwin.go b/internal/socket/defs_darwin.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_darwin.go
+++ b/internal/socket/defs_darwin.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_dragonfly.go b/internal/socket/defs_dragonfly.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_dragonfly.go
+++ b/internal/socket/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_freebsd.go b/internal/socket/defs_freebsd.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_freebsd.go
+++ b/internal/socket/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_linux.go b/internal/socket/defs_linux.go
index 3582439..9b7cb5d 100644
--- a/internal/socket/defs_linux.go
+++ b/internal/socket/defs_linux.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_netbsd.go b/internal/socket/defs_netbsd.go
index 379e157..5b59cdc 100644
--- a/internal/socket/defs_netbsd.go
+++ b/internal/socket/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_openbsd.go b/internal/socket/defs_openbsd.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_openbsd.go
+++ b/internal/socket/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_solaris.go b/internal/socket/defs_solaris.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_solaris.go
+++ b/internal/socket/defs_solaris.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/error_unix.go b/internal/socket/error_unix.go
index 47f0d6e..78f4129 100644
--- a/internal/socket/error_unix.go
+++ b/internal/socket/error_unix.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package socket
diff --git a/internal/socket/iovec_32bit.go b/internal/socket/iovec_32bit.go
index 05d6082..1f42d03 100644
--- a/internal/socket/iovec_32bit.go
+++ b/internal/socket/iovec_32bit.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 (arm || mips || mipsle || 386) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd)
 // +build arm mips mipsle 386
 // +build darwin dragonfly freebsd linux netbsd openbsd
 
diff --git a/internal/socket/iovec_64bit.go b/internal/socket/iovec_64bit.go
index 0309e10..3dc5def 100644
--- a/internal/socket/iovec_64bit.go
+++ b/internal/socket/iovec_64bit.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 (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos)
 // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
 // +build aix darwin dragonfly freebsd linux netbsd openbsd zos
 
diff --git a/internal/socket/iovec_solaris_64bit.go b/internal/socket/iovec_solaris_64bit.go
index 8d17a40..f7da2bc 100644
--- a/internal/socket/iovec_solaris_64bit.go
+++ b/internal/socket/iovec_solaris_64bit.go
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build amd64
-// +build solaris
+//go:build amd64 && solaris
+// +build amd64,solaris
 
 package socket
 
diff --git a/internal/socket/iovec_stub.go b/internal/socket/iovec_stub.go
index f44d4f5..14caf52 100644
--- a/internal/socket/iovec_stub.go
+++ b/internal/socket/iovec_stub.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 && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package socket
diff --git a/internal/socket/mmsghdr_stub.go b/internal/socket/mmsghdr_stub.go
index 1a7f279..113e773 100644
--- a/internal/socket/mmsghdr_stub.go
+++ b/internal/socket/mmsghdr_stub.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 && !linux && !netbsd
 // +build !aix,!linux,!netbsd
 
 package socket
diff --git a/internal/socket/mmsghdr_unix.go b/internal/socket/mmsghdr_unix.go
index f110068..5025a0f 100644
--- a/internal/socket/mmsghdr_unix.go
+++ b/internal/socket/mmsghdr_unix.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 || linux || netbsd
 // +build aix linux netbsd
 
 package socket
diff --git a/internal/socket/msghdr_bsd.go b/internal/socket/msghdr_bsd.go
index 77f44c1..25f6847 100644
--- a/internal/socket/msghdr_bsd.go
+++ b/internal/socket/msghdr_bsd.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 || netbsd || openbsd
 // +build aix darwin dragonfly freebsd netbsd openbsd
 
 package socket
diff --git a/internal/socket/msghdr_bsdvar.go b/internal/socket/msghdr_bsdvar.go
index c5562dd..5b8e00f 100644
--- a/internal/socket/msghdr_bsdvar.go
+++ b/internal/socket/msghdr_bsdvar.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 || netbsd
 // +build aix darwin dragonfly freebsd netbsd
 
 package socket
diff --git a/internal/socket/msghdr_linux_32bit.go b/internal/socket/msghdr_linux_32bit.go
index a7a5987..2e09e26 100644
--- a/internal/socket/msghdr_linux_32bit.go
+++ b/internal/socket/msghdr_linux_32bit.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 (arm || mips || mipsle || 386) && linux
 // +build arm mips mipsle 386
 // +build linux
 
diff --git a/internal/socket/msghdr_linux_64bit.go b/internal/socket/msghdr_linux_64bit.go
index e731833..c9c592d 100644
--- a/internal/socket/msghdr_linux_64bit.go
+++ b/internal/socket/msghdr_linux_64bit.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 (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
 // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
 // +build linux
 
diff --git a/internal/socket/msghdr_solaris_64bit.go b/internal/socket/msghdr_solaris_64bit.go
index 6465b20..3098f5d 100644
--- a/internal/socket/msghdr_solaris_64bit.go
+++ b/internal/socket/msghdr_solaris_64bit.go
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build amd64
-// +build solaris
+//go:build amd64 && solaris
+// +build amd64,solaris
 
 package socket
 
diff --git a/internal/socket/msghdr_stub.go b/internal/socket/msghdr_stub.go
index 1a253d2..eb79151 100644
--- a/internal/socket/msghdr_stub.go
+++ b/internal/socket/msghdr_stub.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 && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package socket
diff --git a/internal/socket/msghdr_zos_s390x.go b/internal/socket/msghdr_zos_s390x.go
index eb1a99a..324e9ee 100644
--- a/internal/socket/msghdr_zos_s390x.go
+++ b/internal/socket/msghdr_zos_s390x.go
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build s390x
-// +build zos
+//go:build s390x && zos
+// +build s390x,zos
 
 package socket
 
diff --git a/internal/socket/norace.go b/internal/socket/norace.go
index 9519ffb..de0ad42 100644
--- a/internal/socket/norace.go
+++ b/internal/socket/norace.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 !race
 // +build !race
 
 package socket
diff --git a/internal/socket/race.go b/internal/socket/race.go
index df60c62..f0a28a6 100644
--- a/internal/socket/race.go
+++ b/internal/socket/race.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 race
 // +build race
 
 package socket
diff --git a/internal/socket/rawconn_mmsg.go b/internal/socket/rawconn_mmsg.go
index d01fc4c..5d90de1 100644
--- a/internal/socket/rawconn_mmsg.go
+++ b/internal/socket/rawconn_mmsg.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
 // +build linux
 
 package socket
diff --git a/internal/socket/rawconn_msg.go b/internal/socket/rawconn_msg.go
index 610b1a1..1c55cb2 100644
--- a/internal/socket/rawconn_msg.go
+++ b/internal/socket/rawconn_msg.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 || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package socket
diff --git a/internal/socket/rawconn_nommsg.go b/internal/socket/rawconn_nommsg.go
index fe5bb94..02f3285 100644
--- a/internal/socket/rawconn_nommsg.go
+++ b/internal/socket/rawconn_nommsg.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
 // +build !linux
 
 package socket
diff --git a/internal/socket/rawconn_nomsg.go b/internal/socket/rawconn_nomsg.go
index e51b60d..dd78587 100644
--- a/internal/socket/rawconn_nomsg.go
+++ b/internal/socket/rawconn_nomsg.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package socket
diff --git a/internal/socket/socket_test.go b/internal/socket/socket_test.go
index 8952c22..e223999 100644
--- a/internal/socket/socket_test.go
+++ b/internal/socket/socket_test.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 || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package socket_test
diff --git a/internal/socket/sys_bsd.go b/internal/socket/sys_bsd.go
index d432835..b6cd770 100644
--- a/internal/socket/sys_bsd.go
+++ b/internal/socket/sys_bsd.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 || openbsd
 // +build aix darwin dragonfly freebsd openbsd
 
 package socket
diff --git a/internal/socket/sys_const_unix.go b/internal/socket/sys_const_unix.go
index 43797d6..f077b2f 100644
--- a/internal/socket/sys_const_unix.go
+++ b/internal/socket/sys_const_unix.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 socket
diff --git a/internal/socket/sys_const_zos.go b/internal/socket/sys_const_zos.go
index 01b6372..3048629 100644
--- a/internal/socket/sys_const_zos.go
+++ b/internal/socket/sys_const_zos.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 zos
 // +build zos
 
 package socket
diff --git a/internal/socket/sys_linkname.go b/internal/socket/sys_linkname.go
index 61c3f38..21734af 100644
--- a/internal/socket/sys_linkname.go
+++ b/internal/socket/sys_linkname.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 || (go1.12 && darwin)
 // +build aix go1.12,darwin
 
 package socket
diff --git a/internal/socket/sys_linux.go b/internal/socket/sys_linux.go
index 8b03cd6..76f5b8a 100644
--- a/internal/socket/sys_linux.go
+++ b/internal/socket/sys_linux.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 && !s390x && !386
 // +build linux,!s390x,!386
 
 package socket
diff --git a/internal/socket/sys_linux_riscv64.go b/internal/socket/sys_linux_riscv64.go
index 64f69f1..5b128fb 100644
--- a/internal/socket/sys_linux_riscv64.go
+++ b/internal/socket/sys_linux_riscv64.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 riscv64
 // +build riscv64
 
 package socket
diff --git a/internal/socket/sys_posix.go b/internal/socket/sys_posix.go
index 05ded23..25ded21 100644
--- a/internal/socket/sys_posix.go
+++ b/internal/socket/sys_posix.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 || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package socket
diff --git a/internal/socket/sys_stub.go b/internal/socket/sys_stub.go
index 3c97008..dc7bb38 100644
--- a/internal/socket/sys_stub.go
+++ b/internal/socket/sys_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package socket
diff --git a/internal/socket/sys_unix.go b/internal/socket/sys_unix.go
index 0eb7128..c98ebae 100644
--- a/internal/socket/sys_unix.go
+++ b/internal/socket/sys_unix.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 || freebsd || (linux && !s390x && !386) || netbsd || openbsd
 // +build dragonfly freebsd linux,!s390x,!386 netbsd openbsd
 
 package socket
diff --git a/internal/socket/zsys_aix_ppc64.go b/internal/socket/zsys_aix_ppc64.go
index 93d923a..79f3bdd 100644
--- a/internal/socket/zsys_aix_ppc64.go
+++ b/internal/socket/zsys_aix_ppc64.go
@@ -2,6 +2,7 @@
 // cgo -godefs defs_aix.go
 
 // Added for go1.11 compatibility
+//go:build aix
 // +build aix
 
 package socket
diff --git a/internal/socket/zsys_linux_riscv64.go b/internal/socket/zsys_linux_riscv64.go
index 8640c03..12ec2e4 100644
--- a/internal/socket/zsys_linux_riscv64.go
+++ b/internal/socket/zsys_linux_riscv64.go
@@ -1,6 +1,7 @@
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
 // cgo -godefs defs_linux.go
 
+//go:build riscv64
 // +build riscv64
 
 package socket
diff --git a/ipv4/control_bsd.go b/ipv4/control_bsd.go
index 69c4f55..6fef740 100644
--- a/ipv4/control_bsd.go
+++ b/ipv4/control_bsd.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 || netbsd || openbsd
 // +build aix darwin dragonfly freebsd netbsd openbsd
 
 package ipv4
diff --git a/ipv4/control_pktinfo.go b/ipv4/control_pktinfo.go
index 425338f..b0a8dbe 100644
--- a/ipv4/control_pktinfo.go
+++ b/ipv4/control_pktinfo.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 || solaris
 // +build darwin linux solaris
 
 package ipv4
diff --git a/ipv4/control_stub.go b/ipv4/control_stub.go
index 9d82534..f27322c 100644
--- a/ipv4/control_stub.go
+++ b/ipv4/control_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv4
diff --git a/ipv4/control_unix.go b/ipv4/control_unix.go
index b27fa49..edce30f 100644
--- a/ipv4/control_unix.go
+++ b/ipv4/control_unix.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 ipv4
diff --git a/ipv4/defs_aix.go b/ipv4/defs_aix.go
index 0f37211..195c8f7 100644
--- a/ipv4/defs_aix.go
+++ b/ipv4/defs_aix.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/defs_darwin.go b/ipv4/defs_darwin.go
index c8f2e05..e886802 100644
--- a/ipv4/defs_darwin.go
+++ b/ipv4/defs_darwin.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/defs_dragonfly.go b/ipv4/defs_dragonfly.go
index f30544e..a751703 100644
--- a/ipv4/defs_dragonfly.go
+++ b/ipv4/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/defs_freebsd.go b/ipv4/defs_freebsd.go
index 4dd57d8..357ce85 100644
--- a/ipv4/defs_freebsd.go
+++ b/ipv4/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/defs_linux.go b/ipv4/defs_linux.go
index 7d05c1d..fcafe8e 100644
--- a/ipv4/defs_linux.go
+++ b/ipv4/defs_linux.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/defs_netbsd.go b/ipv4/defs_netbsd.go
index 8f8af1b..cfde236 100644
--- a/ipv4/defs_netbsd.go
+++ b/ipv4/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/defs_openbsd.go b/ipv4/defs_openbsd.go
index 8f8af1b..cfde236 100644
--- a/ipv4/defs_openbsd.go
+++ b/ipv4/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/defs_solaris.go b/ipv4/defs_solaris.go
index aeb33e9..321063e 100644
--- a/ipv4/defs_solaris.go
+++ b/ipv4/defs_solaris.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 ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/ipv4/gen.go b/ipv4/gen.go
index 1bb1737..e7b053a 100644
--- a/ipv4/gen.go
+++ b/ipv4/gen.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 ignore
 // +build ignore
 
 //go:generate go run gen.go
diff --git a/ipv4/helper_posix_test.go b/ipv4/helper_posix_test.go
index 638eaf2..40f432c 100644
--- a/ipv4/helper_posix_test.go
+++ b/ipv4/helper_posix_test.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 || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package ipv4_test
diff --git a/ipv4/helper_stub_test.go b/ipv4/helper_stub_test.go
index 03ad2a9..e47ddf7 100644
--- a/ipv4/helper_stub_test.go
+++ b/ipv4/helper_stub_test.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv4_test
diff --git a/ipv4/icmp_stub.go b/ipv4/icmp_stub.go
index 21bb29a..cd4ee6e 100644
--- a/ipv4/icmp_stub.go
+++ b/ipv4/icmp_stub.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
 // +build !linux
 
 package ipv4
diff --git a/ipv4/payload_cmsg.go b/ipv4/payload_cmsg.go
index 7bde689..1bb370e 100644
--- a/ipv4/payload_cmsg.go
+++ b/ipv4/payload_cmsg.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package ipv4
diff --git a/ipv4/payload_nocmsg.go b/ipv4/payload_nocmsg.go
index 251bd0c..53f0794 100644
--- a/ipv4/payload_nocmsg.go
+++ b/ipv4/payload_nocmsg.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 && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package ipv4
diff --git a/ipv4/sockopt_posix.go b/ipv4/sockopt_posix.go
index ef29718..eb07c1c 100644
--- a/ipv4/sockopt_posix.go
+++ b/ipv4/sockopt_posix.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 || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package ipv4
diff --git a/ipv4/sockopt_stub.go b/ipv4/sockopt_stub.go
index fbca526..cf03689 100644
--- a/ipv4/sockopt_stub.go
+++ b/ipv4/sockopt_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv4
diff --git a/ipv4/sys_aix.go b/ipv4/sys_aix.go
index 3d1201e..b0b69d9 100644
--- a/ipv4/sys_aix.go
+++ b/ipv4/sys_aix.go
@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Added for go1.11 compatibility
+//go:build aix
 // +build aix
 
 package ipv4
diff --git a/ipv4/sys_asmreq.go b/ipv4/sys_asmreq.go
index 76d670a..22322b3 100644
--- a/ipv4/sys_asmreq.go
+++ b/ipv4/sys_asmreq.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 || netbsd || openbsd || solaris || windows
 // +build aix darwin dragonfly freebsd netbsd openbsd solaris windows
 
 package ipv4
diff --git a/ipv4/sys_asmreq_stub.go b/ipv4/sys_asmreq_stub.go
index 6dc339c..fde6401 100644
--- a/ipv4/sys_asmreq_stub.go
+++ b/ipv4/sys_asmreq_stub.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 && !netbsd && !openbsd && !solaris && !windows
 // +build !aix,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows
 
 package ipv4
diff --git a/ipv4/sys_asmreqn.go b/ipv4/sys_asmreqn.go
index 1f24f69..fbfe4af 100644
--- a/ipv4/sys_asmreqn.go
+++ b/ipv4/sys_asmreqn.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 || freebsd || linux
 // +build darwin freebsd linux
 
 package ipv4
diff --git a/ipv4/sys_asmreqn_stub.go b/ipv4/sys_asmreqn_stub.go
index 48ef556..dcb15f2 100644
--- a/ipv4/sys_asmreqn_stub.go
+++ b/ipv4/sys_asmreqn_stub.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 && !freebsd && !linux
 // +build !darwin,!freebsd,!linux
 
 package ipv4
diff --git a/ipv4/sys_bpf.go b/ipv4/sys_bpf.go
index 5c03dce..fb11e32 100644
--- a/ipv4/sys_bpf.go
+++ b/ipv4/sys_bpf.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
 // +build linux
 
 package ipv4
diff --git a/ipv4/sys_bpf_stub.go b/ipv4/sys_bpf_stub.go
index 5c98642..fc53a0d 100644
--- a/ipv4/sys_bpf_stub.go
+++ b/ipv4/sys_bpf_stub.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
 // +build !linux
 
 package ipv4
diff --git a/ipv4/sys_bsd.go b/ipv4/sys_bsd.go
index 58256dd..8074f98 100644
--- a/ipv4/sys_bsd.go
+++ b/ipv4/sys_bsd.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 || openbsd
 // +build netbsd openbsd
 
 package ipv4
diff --git a/ipv4/sys_ssmreq.go b/ipv4/sys_ssmreq.go
index eeced7f..6a4e7ab 100644
--- a/ipv4/sys_ssmreq.go
+++ b/ipv4/sys_ssmreq.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 || freebsd || linux || solaris
 // +build darwin freebsd linux solaris
 
 package ipv4
diff --git a/ipv4/sys_ssmreq_stub.go b/ipv4/sys_ssmreq_stub.go
index c092167..157159f 100644
--- a/ipv4/sys_ssmreq_stub.go
+++ b/ipv4/sys_ssmreq_stub.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 && !freebsd && !linux && !solaris
 // +build !darwin,!freebsd,!linux,!solaris
 
 package ipv4
diff --git a/ipv4/sys_stub.go b/ipv4/sys_stub.go
index 5555851..d550851 100644
--- a/ipv4/sys_stub.go
+++ b/ipv4/sys_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv4
diff --git a/ipv4/zsys_aix_ppc64.go b/ipv4/zsys_aix_ppc64.go
index c741d5c..d6f2475 100644
--- a/ipv4/zsys_aix_ppc64.go
+++ b/ipv4/zsys_aix_ppc64.go
@@ -2,6 +2,7 @@
 // cgo -godefs defs_aix.go
 
 // Added for go1.11 compatibility
+//go:build aix
 // +build aix
 
 package ipv4
diff --git a/ipv4/zsys_linux_riscv64.go b/ipv4/zsys_linux_riscv64.go
index e626134..ec9e2db 100644
--- a/ipv4/zsys_linux_riscv64.go
+++ b/ipv4/zsys_linux_riscv64.go
@@ -1,6 +1,7 @@
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
 // cgo -godefs defs_linux.go
 
+//go:build riscv64
 // +build riscv64
 
 package ipv4
diff --git a/ipv6/control_rfc2292_unix.go b/ipv6/control_rfc2292_unix.go
index 9fd9eb1..dd5fdc3 100644
--- a/ipv6/control_rfc2292_unix.go
+++ b/ipv6/control_rfc2292_unix.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
 // +build darwin
 
 package ipv6
diff --git a/ipv6/control_rfc3542_unix.go b/ipv6/control_rfc3542_unix.go
index 77c449e..2422194 100644
--- a/ipv6/control_rfc3542_unix.go
+++ b/ipv6/control_rfc3542_unix.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package ipv6
diff --git a/ipv6/control_stub.go b/ipv6/control_stub.go
index e50b886..b7e8643 100644
--- a/ipv6/control_stub.go
+++ b/ipv6/control_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv6
diff --git a/ipv6/control_unix.go b/ipv6/control_unix.go
index ec31ca2..63e475d 100644
--- a/ipv6/control_unix.go
+++ b/ipv6/control_unix.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package ipv6
diff --git a/ipv6/defs_aix.go b/ipv6/defs_aix.go
index ea396a3..bee7eed 100644
--- a/ipv6/defs_aix.go
+++ b/ipv6/defs_aix.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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/defs_darwin.go b/ipv6/defs_darwin.go
index 55ddc11..f2d9e85 100644
--- a/ipv6/defs_darwin.go
+++ b/ipv6/defs_darwin.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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/defs_dragonfly.go b/ipv6/defs_dragonfly.go
index 27a1d1d..0cba5d4 100644
--- a/ipv6/defs_dragonfly.go
+++ b/ipv6/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/defs_freebsd.go b/ipv6/defs_freebsd.go
index 53e6253..06bfc91 100644
--- a/ipv6/defs_freebsd.go
+++ b/ipv6/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/defs_linux.go b/ipv6/defs_linux.go
index 3b697be..6ae7228 100644
--- a/ipv6/defs_linux.go
+++ b/ipv6/defs_linux.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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/defs_netbsd.go b/ipv6/defs_netbsd.go
index be9ceb9..f760978 100644
--- a/ipv6/defs_netbsd.go
+++ b/ipv6/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/defs_openbsd.go b/ipv6/defs_openbsd.go
index 177ddf8..70bed53 100644
--- a/ipv6/defs_openbsd.go
+++ b/ipv6/defs_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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/defs_solaris.go b/ipv6/defs_solaris.go
index 0f8ce2b..508b3bf 100644
--- a/ipv6/defs_solaris.go
+++ b/ipv6/defs_solaris.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 ignore
 // +build ignore
 
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
diff --git a/ipv6/gen.go b/ipv6/gen.go
index 5885664..bd53468 100644
--- a/ipv6/gen.go
+++ b/ipv6/gen.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 ignore
 // +build ignore
 
 //go:generate go run gen.go
diff --git a/ipv6/helper_posix_test.go b/ipv6/helper_posix_test.go
index 6f5e78f..ab561f3 100644
--- a/ipv6/helper_posix_test.go
+++ b/ipv6/helper_posix_test.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 || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package ipv6_test
diff --git a/ipv6/helper_stub_test.go b/ipv6/helper_stub_test.go
index 066de62..15e99fa 100644
--- a/ipv6/helper_stub_test.go
+++ b/ipv6/helper_stub_test.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv6_test
diff --git a/ipv6/helper_unix_test.go b/ipv6/helper_unix_test.go
index e76d1ca..a154f7c 100644
--- a/ipv6/helper_unix_test.go
+++ b/ipv6/helper_unix_test.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package ipv6_test
diff --git a/ipv6/icmp_bsd.go b/ipv6/icmp_bsd.go
index b03025c..120bf87 100644
--- a/ipv6/icmp_bsd.go
+++ b/ipv6/icmp_bsd.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 || netbsd || openbsd
 // +build aix darwin dragonfly freebsd netbsd openbsd
 
 package ipv6
diff --git a/ipv6/icmp_stub.go b/ipv6/icmp_stub.go
index 297e191..d60136a 100644
--- a/ipv6/icmp_stub.go
+++ b/ipv6/icmp_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv6
diff --git a/ipv6/payload_cmsg.go b/ipv6/payload_cmsg.go
index 8baa26e..b0692e4 100644
--- a/ipv6/payload_cmsg.go
+++ b/ipv6/payload_cmsg.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package ipv6
diff --git a/ipv6/payload_nocmsg.go b/ipv6/payload_nocmsg.go
index 00c4f58..cd0ff50 100644
--- a/ipv6/payload_nocmsg.go
+++ b/ipv6/payload_nocmsg.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 && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package ipv6
diff --git a/ipv6/sockopt_posix.go b/ipv6/sockopt_posix.go
index f718792..37c6287 100644
--- a/ipv6/sockopt_posix.go
+++ b/ipv6/sockopt_posix.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 || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package ipv6
diff --git a/ipv6/sockopt_stub.go b/ipv6/sockopt_stub.go
index d87db6a..32fd866 100644
--- a/ipv6/sockopt_stub.go
+++ b/ipv6/sockopt_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv6
diff --git a/ipv6/sys_aix.go b/ipv6/sys_aix.go
index bce7091..29c5c0e 100644
--- a/ipv6/sys_aix.go
+++ b/ipv6/sys_aix.go
@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Added for go1.11 compatibility
+//go:build aix
 // +build aix
 
 package ipv6
diff --git a/ipv6/sys_asmreq.go b/ipv6/sys_asmreq.go
index 8c3934c..6ff9950 100644
--- a/ipv6/sys_asmreq.go
+++ b/ipv6/sys_asmreq.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 || windows
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
 
 package ipv6
diff --git a/ipv6/sys_asmreq_stub.go b/ipv6/sys_asmreq_stub.go
index 87ae481..485290c 100644
--- a/ipv6/sys_asmreq_stub.go
+++ b/ipv6/sys_asmreq_stub.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 && !windows
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
 
 package ipv6
diff --git a/ipv6/sys_bpf.go b/ipv6/sys_bpf.go
index 90ef4df..b5661fb 100644
--- a/ipv6/sys_bpf.go
+++ b/ipv6/sys_bpf.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
 // +build linux
 
 package ipv6
diff --git a/ipv6/sys_bpf_stub.go b/ipv6/sys_bpf_stub.go
index eb9f831..cb00661 100644
--- a/ipv6/sys_bpf_stub.go
+++ b/ipv6/sys_bpf_stub.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
 // +build !linux
 
 package ipv6
diff --git a/ipv6/sys_bsd.go b/ipv6/sys_bsd.go
index e416eaa..63e5ee2 100644
--- a/ipv6/sys_bsd.go
+++ b/ipv6/sys_bsd.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 || netbsd || openbsd
 // +build dragonfly netbsd openbsd
 
 package ipv6
diff --git a/ipv6/sys_ssmreq.go b/ipv6/sys_ssmreq.go
index 88d64f1..023488a 100644
--- a/ipv6/sys_ssmreq.go
+++ b/ipv6/sys_ssmreq.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 || freebsd || linux || solaris || zos
 // +build aix darwin freebsd linux solaris zos
 
 package ipv6
diff --git a/ipv6/sys_ssmreq_stub.go b/ipv6/sys_ssmreq_stub.go
index b070886..acdf2e5 100644
--- a/ipv6/sys_ssmreq_stub.go
+++ b/ipv6/sys_ssmreq_stub.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 && !freebsd && !linux && !solaris && !zos
 // +build !aix,!darwin,!freebsd,!linux,!solaris,!zos
 
 package ipv6
diff --git a/ipv6/sys_stub.go b/ipv6/sys_stub.go
index cbe4a02..5807bba 100644
--- a/ipv6/sys_stub.go
+++ b/ipv6/sys_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package ipv6
diff --git a/ipv6/zsys_aix_ppc64.go b/ipv6/zsys_aix_ppc64.go
index bf44e33..75e2dd9 100644
--- a/ipv6/zsys_aix_ppc64.go
+++ b/ipv6/zsys_aix_ppc64.go
@@ -2,6 +2,7 @@
 // cgo -godefs defs_aix.go
 
 // Added for go1.11 compatibility
+//go:build aix
 // +build aix
 
 package ipv6
diff --git a/ipv6/zsys_linux_riscv64.go b/ipv6/zsys_linux_riscv64.go
index 6083ddc..2072c31 100644
--- a/ipv6/zsys_linux_riscv64.go
+++ b/ipv6/zsys_linux_riscv64.go
@@ -1,6 +1,7 @@
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
 // cgo -godefs defs_linux.go
 
+//go:build riscv64
 // +build riscv64
 
 package ipv6
diff --git a/nettest/conntest_test.go b/nettest/conntest_test.go
index da24168..7c5aeb9 100644
--- a/nettest/conntest_test.go
+++ b/nettest/conntest_test.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 go1.8
 // +build go1.8
 
 package nettest
diff --git a/nettest/nettest_stub.go b/nettest/nettest_stub.go
index 22c2461..6e3a931 100644
--- a/nettest/nettest_stub.go
+++ b/nettest/nettest_stub.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 && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package nettest
diff --git a/nettest/nettest_unix.go b/nettest/nettest_unix.go
index c1b1359..b1cb8b2 100644
--- a/nettest/nettest_unix.go
+++ b/nettest/nettest_unix.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 || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package nettest
diff --git a/netutil/helper_stub_test.go b/netutil/helper_stub_test.go
index 6034aac..863d23b 100644
--- a/netutil/helper_stub_test.go
+++ b/netutil/helper_stub_test.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 && !windows
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
 
 package netutil
diff --git a/netutil/helper_unix_test.go b/netutil/helper_unix_test.go
index fd71243..922790a 100644
--- a/netutil/helper_unix_test.go
+++ b/netutil/helper_unix_test.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 netutil
diff --git a/publicsuffix/gen.go b/publicsuffix/gen.go
index ac8178a..16c31c6 100644
--- a/publicsuffix/gen.go
+++ b/publicsuffix/gen.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 ignore
 // +build ignore
 
 package main
diff --git a/route/address.go b/route/address.go
index 3c2fe15..4f6ad96 100644
--- a/route/address.go
+++ b/route/address.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/address_test.go b/route/address_test.go
index 2005ef7..420399b 100644
--- a/route/address_test.go
+++ b/route/address_test.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/binary.go b/route/binary.go
index 6910520..a5e28f1 100644
--- a/route/binary.go
+++ b/route/binary.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/defs_darwin.go b/route/defs_darwin.go
index e771644..72a995e 100644
--- a/route/defs_darwin.go
+++ b/route/defs_darwin.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 ignore
 // +build ignore
 
 package route
diff --git a/route/defs_dragonfly.go b/route/defs_dragonfly.go
index e71dbc2..d314b73 100644
--- a/route/defs_dragonfly.go
+++ b/route/defs_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 ignore
 // +build ignore
 
 package route
diff --git a/route/defs_freebsd.go b/route/defs_freebsd.go
index d95594d..b1c4dbf 100644
--- a/route/defs_freebsd.go
+++ b/route/defs_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 ignore
 // +build ignore
 
 package route
diff --git a/route/defs_netbsd.go b/route/defs_netbsd.go
index b0abd54..74d39e3 100644
--- a/route/defs_netbsd.go
+++ b/route/defs_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 ignore
 // +build ignore
 
 package route
diff --git a/route/defs_openbsd.go b/route/defs_openbsd.go
index 173bb5d..9c02a75 100644
--- a/route/defs_openbsd.go
+++ b/route/defs_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 ignore
 // +build ignore
 
 package route
diff --git a/route/interface.go b/route/interface.go
index 05ef2a9..9e94078 100644
--- a/route/interface.go
+++ b/route/interface.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/interface_announce.go b/route/interface_announce.go
index 520d657..8282bfe 100644
--- a/route/interface_announce.go
+++ b/route/interface_announce.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 || freebsd || netbsd
 // +build dragonfly freebsd netbsd
 
 package route
diff --git a/route/interface_classic.go b/route/interface_classic.go
index ac4e7a6..85b7e99 100644
--- a/route/interface_classic.go
+++ b/route/interface_classic.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 || dragonfly || netbsd
 // +build darwin dragonfly netbsd
 
 package route
diff --git a/route/interface_multicast.go b/route/interface_multicast.go
index 1e99a9c..dd0b214 100644
--- a/route/interface_multicast.go
+++ b/route/interface_multicast.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 || dragonfly || freebsd
 // +build darwin dragonfly freebsd
 
 package route
diff --git a/route/message.go b/route/message.go
index 80c482a..d53bb7f 100644
--- a/route/message.go
+++ b/route/message.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/message_test.go b/route/message_test.go
index 9a8d2c4..e5284e4 100644
--- a/route/message_test.go
+++ b/route/message_test.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/route.go b/route/route.go
index 4462cf1..e3d6da0 100644
--- a/route/route.go
+++ b/route/route.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 // Package route provides basic functions for the manipulation of
diff --git a/route/route_classic.go b/route/route_classic.go
index b83add6..d6ee42f 100644
--- a/route/route_classic.go
+++ b/route/route_classic.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 || dragonfly || freebsd || netbsd
 // +build darwin dragonfly freebsd netbsd
 
 package route
diff --git a/route/route_test.go b/route/route_test.go
index 61bd174..2693269 100644
--- a/route/route_test.go
+++ b/route/route_test.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/sys.go b/route/sys.go
index a0ab3e9..537484a 100644
--- a/route/sys.go
+++ b/route/sys.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 || dragonfly || freebsd || netbsd || openbsd
 // +build darwin dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/syscall.go b/route/syscall.go
index 72431b0..97166dd 100644
--- a/route/syscall.go
+++ b/route/syscall.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 || freebsd || netbsd || openbsd
 // +build dragonfly freebsd netbsd openbsd
 
 package route
diff --git a/route/syscall_go1_12_darwin.go b/route/syscall_go1_12_darwin.go
index 7922a68..7a13e4f 100644
--- a/route/syscall_go1_12_darwin.go
+++ b/route/syscall_go1_12_darwin.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 go1.12
 // +build go1.12
 
 package route
diff --git a/webdav/litmus_test_server.go b/webdav/litmus_test_server.go
index 514db5d..6334d7e 100644
--- a/webdav/litmus_test_server.go
+++ b/webdav/litmus_test_server.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 ignore
 // +build ignore
 
 /*