From da8def8e13d44df0c4183300c826523ba933cb37 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 4 Nov 2022 06:42:58 -0700 Subject: [PATCH] all: remove old +build tags The //go:build syntax was introduced in Go 1.17: https://go.dev/doc/go1.17#build-lines gofmt has kept the +build and go:build lines in sync since then, but enough time has passed. Time to remove them. Done with: perl -i -npe 's,^// \+build.*\n,,' $(git grep -l -F '+build') Signed-off-by: Brad Fitzpatrick --- client/tailscale/acl.go | 1 - client/tailscale/devices.go | 1 - client/tailscale/dns.go | 1 - client/tailscale/localclient.go | 1 - client/tailscale/required_version.go | 1 - client/tailscale/routes.go | 1 - client/tailscale/tailnet.go | 1 - client/tailscale/tailscale.go | 1 - cmd/containerboot/kube.go | 1 - cmd/containerboot/main.go | 1 - cmd/tailscale/cli/diag.go | 1 - cmd/tailscale/cli/diag_other.go | 1 - cmd/tailscale/cli/ssh_exec.go | 1 - cmd/tailscale/cli/ssh_unix.go | 1 - cmd/tailscaled/debug.go | 1 - cmd/tailscaled/install_darwin.go | 1 - cmd/tailscaled/install_windows.go | 1 - cmd/tailscaled/proxy.go | 1 - cmd/tailscaled/required_version.go | 1 - cmd/tailscaled/ssh.go | 1 - cmd/tailscaled/tailscaled.go | 1 - cmd/tailscaled/tailscaled_bird.go | 2 -- cmd/tailscaled/tailscaled_notwindows.go | 1 - cmd/tailscaled/tailscaled_windows.go | 1 - cmd/tailscaled/with_cli.go | 1 - cmd/tsshd/tsshd.go | 1 - control/controlclient/sign_supported.go | 1 - control/controlclient/sign_supported_test.go | 1 - control/controlclient/sign_unsupported.go | 1 - control/controlhttp/client.go | 1 - derp/derp_server_default.go | 1 - derp/derphttp/websocket.go | 1 - disco/disco_fuzzer.go | 1 - hostinfo/hostinfo_darwin.go | 1 - hostinfo/hostinfo_freebsd.go | 1 - hostinfo/hostinfo_linux.go | 1 - hostinfo/hostinfo_linux_test.go | 1 - internal/tooldeps/tooldeps.go | 1 - ipn/ipnlocal/peerapi_h2c.go | 1 - ipn/ipnlocal/peerapi_macios_ext.go | 2 -- ipn/ipnlocal/ssh.go | 1 - ipn/ipnlocal/ssh_test.go | 1 - ipn/ipnserver/proxyconnect.go | 1 - ipn/localapi/cert.go | 1 - ipn/localapi/cert_test.go | 1 - ipn/localapi/disabled_stubs.go | 1 - ipn/localapi/profile.go | 1 - ipn/store/awsstore/store_aws.go | 1 - ipn/store/awsstore/store_aws_stub.go | 1 - ipn/store/awsstore/store_aws_test.go | 1 - log/logheap/logheap.go | 1 - logtail/filch/filch_unix.go | 1 - metrics/fds_notlinux.go | 1 - net/dns/debian_resolvconf.go | 1 - net/dns/flush_default.go | 1 - net/dns/ini.go | 1 - net/dns/ini_test.go | 1 - net/dns/manager_default.go | 1 - net/dns/nm.go | 1 - net/dns/openresolv.go | 1 - net/dns/resolvconf.go | 1 - net/dns/resolvd.go | 1 - net/dns/resolved.go | 1 - net/dns/resolver/macios_ext.go | 2 -- net/dnsfallback/update-dns-fallbacks.go | 1 - net/interfaces/interfaces_bsd.go | 1 - net/interfaces/interfaces_default_route_test.go | 1 - net/interfaces/interfaces_defaultrouteif_todo.go | 1 - net/interfaces/interfaces_freebsd.go | 1 - net/netns/netns_android.go | 1 - net/netns/netns_darwin_tailscaled.go | 1 - net/netns/netns_default.go | 1 - net/netns/netns_linux.go | 1 - net/netns/netns_macios.go | 1 - net/netns/socks.go | 1 - net/netstat/netstat_noimpl.go | 1 - net/portmapper/disabled_stubs.go | 1 - net/portmapper/upnp.go | 1 - net/routetable/routetable_bsd.go | 1 - net/routetable/routetable_bsd_test.go | 1 - net/routetable/routetable_darwin.go | 1 - net/routetable/routetable_freebsd.go | 1 - net/routetable/routetable_linux.go | 1 - net/routetable/routetable_linux_test.go | 1 - net/stun/stun_fuzzer.go | 1 - net/tlsdial/deps_test.go | 1 - net/tsdial/peerapi_macios_ext.go | 2 -- net/tshttpproxy/tshttpproxy_future.go | 1 - net/tshttpproxy/tshttpproxy_linux.go | 1 - net/tshttpproxy/tshttpproxy_synology.go | 1 - net/tshttpproxy/tshttpproxy_synology_test.go | 1 - net/tstun/ifstatus_noop.go | 1 - net/tstun/linkattrs_notlinux.go | 1 - net/tstun/tap_unsupported.go | 1 - net/tstun/tun.go | 1 - net/tstun/tun_macos.go | 1 - net/tstun/tun_notwindows.go | 1 - paths/paths_unix.go | 1 - portlist/netstat.go | 1 - portlist/netstat_exec.go | 3 --- portlist/netstat_test.go | 1 - portlist/portlist_ios.go | 1 - portlist/portlist_macos.go | 1 - portlist/portlist_other.go | 1 - safesocket/safesocket_ps.go | 1 - safesocket/unixsocket.go | 1 - ssh/tailssh/incubator.go | 1 - ssh/tailssh/incubator_linux.go | 1 - ssh/tailssh/tailssh.go | 1 - ssh/tailssh/tailssh_test.go | 1 - syncs/locked_test.go | 1 - tempfork/gliderlabs/ssh/context_test.go | 1 - tempfork/gliderlabs/ssh/options_test.go | 1 - tempfork/gliderlabs/ssh/server_test.go | 1 - tempfork/gliderlabs/ssh/session_test.go | 1 - tempfork/gliderlabs/ssh/tcpip_test.go | 1 - tstest/archtest/qemu_test.go | 1 - tstest/integration/gen_deps.go | 1 - tstest/integration/vms/dns_tester.go | 1 - tstest/integration/vms/harness_test.go | 1 - tstest/integration/vms/nixos_test.go | 1 - tstest/integration/vms/top_level_test.go | 1 - tstest/integration/vms/udp_tester.go | 1 - tstest/integration/vms/vm_setup_test.go | 1 - tstest/integration/vms/vms_steps_test.go | 1 - tstest/integration/vms/vms_test.go | 1 - tstest/iosdeps/iosdeps_test.go | 1 - tstest/jsdeps/jsdeps_test.go | 1 - tstest/tools/tools.go | 1 - tstime/rate/rate_test.go | 1 - types/logger/rusage_stub.go | 1 - types/logger/rusage_syscall.go | 1 - util/cstruct/cstruct_example_test.go | 1 - util/endian/big.go | 1 - util/endian/little.go | 1 - util/osshare/filesharingstatus_noop.go | 1 - util/osshare/filesharingstatus_windows.go | 1 - util/pidowner/pidowner_noimpl.go | 1 - util/racebuild/off.go | 1 - util/racebuild/on.go | 1 - util/systemd/systemd_linux.go | 1 - util/systemd/systemd_nonlinux.go | 1 - util/winutil/winutil_notwindows.go | 1 - version/cmdname.go | 1 - version/cmdname_ios.go | 1 - version/race.go | 1 - version/race_off.go | 1 - wf/firewall.go | 1 - wgengine/magicsock/debugknobs.go | 1 - wgengine/magicsock/debugknobs_stubs.go | 1 - wgengine/magicsock/magicsock_default.go | 1 - wgengine/magicsock/magicsock_unix_test.go | 1 - wgengine/monitor/monitor_linux.go | 1 - wgengine/monitor/monitor_polling.go | 1 - wgengine/monitor/polling.go | 1 - wgengine/router/router_default.go | 1 - wgengine/router/router_userspace_bsd.go | 1 - wgengine/router/runner.go | 1 - wgengine/watchdog.go | 1 - wgengine/winnet/winnet.go | 1 - 160 files changed, 166 deletions(-) diff --git a/client/tailscale/acl.go b/client/tailscale/acl.go index 75ccb28ab..9ecf7d373 100644 --- a/client/tailscale/acl.go +++ b/client/tailscale/acl.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package tailscale diff --git a/client/tailscale/devices.go b/client/tailscale/devices.go index 8b1cc25f0..bba6985d4 100644 --- a/client/tailscale/devices.go +++ b/client/tailscale/devices.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package tailscale diff --git a/client/tailscale/dns.go b/client/tailscale/dns.go index d907961af..51f8dcfcc 100644 --- a/client/tailscale/dns.go +++ b/client/tailscale/dns.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package tailscale diff --git a/client/tailscale/localclient.go b/client/tailscale/localclient.go index 1a9a1567c..648c8cc11 100644 --- a/client/tailscale/localclient.go +++ b/client/tailscale/localclient.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package tailscale diff --git a/client/tailscale/required_version.go b/client/tailscale/required_version.go index 484bfc379..1f255a8c3 100644 --- a/client/tailscale/required_version.go +++ b/client/tailscale/required_version.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.19 -// +build !go1.19 package tailscale diff --git a/client/tailscale/routes.go b/client/tailscale/routes.go index 0f6b83e72..fcf6d5227 100644 --- a/client/tailscale/routes.go +++ b/client/tailscale/routes.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package tailscale diff --git a/client/tailscale/tailnet.go b/client/tailscale/tailnet.go index e4f052455..f6f1a0df6 100644 --- a/client/tailscale/tailnet.go +++ b/client/tailscale/tailnet.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package tailscale diff --git a/client/tailscale/tailscale.go b/client/tailscale/tailscale.go index 626532e72..60e1a0fb9 100644 --- a/client/tailscale/tailscale.go +++ b/client/tailscale/tailscale.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 // Package tailscale contains Go clients for the Tailscale Local API and // Tailscale control plane API. diff --git a/cmd/containerboot/kube.go b/cmd/containerboot/kube.go index 562bdb62b..72e8ef068 100644 --- a/cmd/containerboot/kube.go +++ b/cmd/containerboot/kube.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package main diff --git a/cmd/containerboot/main.go b/cmd/containerboot/main.go index 232e3671c..c3dd13f14 100644 --- a/cmd/containerboot/main.go +++ b/cmd/containerboot/main.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux // The containerboot binary is a wrapper for starting tailscaled in a // container. It handles reading the desired mode of operation out of diff --git a/cmd/tailscale/cli/diag.go b/cmd/tailscale/cli/diag.go index 5a09b1714..a1d500949 100644 --- a/cmd/tailscale/cli/diag.go +++ b/cmd/tailscale/cli/diag.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || windows || darwin -// +build linux windows darwin package cli diff --git a/cmd/tailscale/cli/diag_other.go b/cmd/tailscale/cli/diag_other.go index a3e06564a..d8deb6390 100644 --- a/cmd/tailscale/cli/diag_other.go +++ b/cmd/tailscale/cli/diag_other.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && !windows && !darwin -// +build !linux,!windows,!darwin package cli diff --git a/cmd/tailscale/cli/ssh_exec.go b/cmd/tailscale/cli/ssh_exec.go index bee4d3242..67817bf40 100644 --- a/cmd/tailscale/cli/ssh_exec.go +++ b/cmd/tailscale/cli/ssh_exec.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js && !windows -// +build !js,!windows package cli diff --git a/cmd/tailscale/cli/ssh_unix.go b/cmd/tailscale/cli/ssh_unix.go index 4d10fe617..cb3c61a61 100644 --- a/cmd/tailscale/cli/ssh_unix.go +++ b/cmd/tailscale/cli/ssh_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js && !windows -// +build !js,!windows package cli diff --git a/cmd/tailscaled/debug.go b/cmd/tailscaled/debug.go index 1672af20f..fddc31e4a 100644 --- a/cmd/tailscaled/debug.go +++ b/cmd/tailscaled/debug.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package main diff --git a/cmd/tailscaled/install_darwin.go b/cmd/tailscaled/install_darwin.go index ca930a91d..5544d8671 100644 --- a/cmd/tailscaled/install_darwin.go +++ b/cmd/tailscaled/install_darwin.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package main diff --git a/cmd/tailscaled/install_windows.go b/cmd/tailscaled/install_windows.go index 64832e47c..0331fe135 100644 --- a/cmd/tailscaled/install_windows.go +++ b/cmd/tailscaled/install_windows.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package main diff --git a/cmd/tailscaled/proxy.go b/cmd/tailscaled/proxy.go index 6562d7637..428a44dca 100644 --- a/cmd/tailscaled/proxy.go +++ b/cmd/tailscaled/proxy.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 // HTTP proxy code diff --git a/cmd/tailscaled/required_version.go b/cmd/tailscaled/required_version.go index dad4c1265..ba077d4fb 100644 --- a/cmd/tailscaled/required_version.go +++ b/cmd/tailscaled/required_version.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.19 -// +build !go1.19 package main diff --git a/cmd/tailscaled/ssh.go b/cmd/tailscaled/ssh.go index d566ec8ec..fa7275a56 100644 --- a/cmd/tailscaled/ssh.go +++ b/cmd/tailscaled/ssh.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || darwin -// +build linux darwin package main diff --git a/cmd/tailscaled/tailscaled.go b/cmd/tailscaled/tailscaled.go index 49268515d..bea9d0a57 100644 --- a/cmd/tailscaled/tailscaled.go +++ b/cmd/tailscaled/tailscaled.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 // The tailscaled program is the Tailscale client daemon. It's configured // and controlled via the tailscale CLI program. diff --git a/cmd/tailscaled/tailscaled_bird.go b/cmd/tailscaled/tailscaled_bird.go index c5d526c81..b871ca7c1 100644 --- a/cmd/tailscaled/tailscaled_bird.go +++ b/cmd/tailscaled/tailscaled_bird.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 && (linux || darwin || freebsd || openbsd) -// +build go1.19 -// +build linux darwin freebsd openbsd package main diff --git a/cmd/tailscaled/tailscaled_notwindows.go b/cmd/tailscaled/tailscaled_notwindows.go index ea5ee7773..1dedc5f2e 100644 --- a/cmd/tailscaled/tailscaled_notwindows.go +++ b/cmd/tailscaled/tailscaled_notwindows.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && go1.19 -// +build !windows,go1.19 package main // import "tailscale.com/cmd/tailscaled" diff --git a/cmd/tailscaled/tailscaled_windows.go b/cmd/tailscaled/tailscaled_windows.go index 35f7623ce..ae47769c0 100644 --- a/cmd/tailscaled/tailscaled_windows.go +++ b/cmd/tailscaled/tailscaled_windows.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.19 -// +build go1.19 package main // import "tailscale.com/cmd/tailscaled" diff --git a/cmd/tailscaled/with_cli.go b/cmd/tailscaled/with_cli.go index 578351fe3..b55a0d289 100644 --- a/cmd/tailscaled/with_cli.go +++ b/cmd/tailscaled/with_cli.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ts_include_cli -// +build ts_include_cli package main diff --git a/cmd/tsshd/tsshd.go b/cmd/tsshd/tsshd.go index 0d42b34f9..a14031bae 100644 --- a/cmd/tsshd/tsshd.go +++ b/cmd/tsshd/tsshd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // The tsshd binary was an experimental SSH server that accepts connections // from anybody on the same Tailscale network. diff --git a/control/controlclient/sign_supported.go b/control/controlclient/sign_supported.go index 3c51126a2..75e3c33d0 100644 --- a/control/controlclient/sign_supported.go +++ b/control/controlclient/sign_supported.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && cgo -// +build windows,cgo // darwin,cgo is also supported by certstore but machineCertificateSubject will // need to be loaded by a different mechanism, so this is not currently enabled diff --git a/control/controlclient/sign_supported_test.go b/control/controlclient/sign_supported_test.go index c196cbb44..4fdb313d9 100644 --- a/control/controlclient/sign_supported_test.go +++ b/control/controlclient/sign_supported_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && cgo -// +build windows,cgo package controlclient diff --git a/control/controlclient/sign_unsupported.go b/control/controlclient/sign_unsupported.go index 936806557..c1a1813a7 100644 --- a/control/controlclient/sign_unsupported.go +++ b/control/controlclient/sign_unsupported.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows || !cgo -// +build !windows !cgo package controlclient diff --git a/control/controlhttp/client.go b/control/controlhttp/client.go index 4bf8b9b6b..4f3d683af 100644 --- a/control/controlhttp/client.go +++ b/control/controlhttp/client.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js -// +build !js // Package controlhttp implements the Tailscale 2021 control protocol // base transport over HTTP. diff --git a/derp/derp_server_default.go b/derp/derp_server_default.go index ce932999d..32207b350 100644 --- a/derp/derp_server_default.go +++ b/derp/derp_server_default.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux -// +build !linux package derp diff --git a/derp/derphttp/websocket.go b/derp/derphttp/websocket.go index e2c343dfe..ab651fb96 100644 --- a/derp/derphttp/websocket.go +++ b/derp/derphttp/websocket.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || js -// +build linux js package derphttp diff --git a/disco/disco_fuzzer.go b/disco/disco_fuzzer.go index 62036bfc6..647cd0d61 100644 --- a/disco/disco_fuzzer.go +++ b/disco/disco_fuzzer.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build gofuzz -// +build gofuzz package disco diff --git a/hostinfo/hostinfo_darwin.go b/hostinfo/hostinfo_darwin.go index 367fd1d5e..60a9f37ba 100644 --- a/hostinfo/hostinfo_darwin.go +++ b/hostinfo/hostinfo_darwin.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin -// +build darwin package hostinfo diff --git a/hostinfo/hostinfo_freebsd.go b/hostinfo/hostinfo_freebsd.go index c8ed9fa34..e5d84aab3 100644 --- a/hostinfo/hostinfo_freebsd.go +++ b/hostinfo/hostinfo_freebsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd -// +build freebsd package hostinfo diff --git a/hostinfo/hostinfo_linux.go b/hostinfo/hostinfo_linux.go index 1562d334a..724fe62f9 100644 --- a/hostinfo/hostinfo_linux.go +++ b/hostinfo/hostinfo_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !android -// +build linux,!android package hostinfo diff --git a/hostinfo/hostinfo_linux_test.go b/hostinfo/hostinfo_linux_test.go index ba68c9257..5d428d3ee 100644 --- a/hostinfo/hostinfo_linux_test.go +++ b/hostinfo/hostinfo_linux_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !android -// +build linux,!android package hostinfo diff --git a/internal/tooldeps/tooldeps.go b/internal/tooldeps/tooldeps.go index 92c25ff28..c59600492 100644 --- a/internal/tooldeps/tooldeps.go +++ b/internal/tooldeps/tooldeps.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build for_go_mod_tidy_only -// +build for_go_mod_tidy_only package tooldeps diff --git a/ipn/ipnlocal/peerapi_h2c.go b/ipn/ipnlocal/peerapi_h2c.go index 39c9199ec..3f8fb45c6 100644 --- a/ipn/ipnlocal/peerapi_h2c.go +++ b/ipn/ipnlocal/peerapi_h2c.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !android && !js -// +build !ios,!android,!js package ipnlocal diff --git a/ipn/ipnlocal/peerapi_macios_ext.go b/ipn/ipnlocal/peerapi_macios_ext.go index b10e999aa..f056c5edd 100644 --- a/ipn/ipnlocal/peerapi_macios_ext.go +++ b/ipn/ipnlocal/peerapi_macios_ext.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build ts_macext && (darwin || ios) -// +build ts_macext -// +build darwin ios package ipnlocal diff --git a/ipn/ipnlocal/ssh.go b/ipn/ipnlocal/ssh.go index 8ea43e596..52c4c36da 100644 --- a/ipn/ipnlocal/ssh.go +++ b/ipn/ipnlocal/ssh.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || (darwin && !ios) -// +build linux darwin,!ios package ipnlocal diff --git a/ipn/ipnlocal/ssh_test.go b/ipn/ipnlocal/ssh_test.go index 14dd3f6a3..ef8518e20 100644 --- a/ipn/ipnlocal/ssh_test.go +++ b/ipn/ipnlocal/ssh_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || (darwin && !ios) -// +build linux darwin,!ios package ipnlocal diff --git a/ipn/ipnserver/proxyconnect.go b/ipn/ipnserver/proxyconnect.go index 9ca7e7690..b3eb0d458 100644 --- a/ipn/ipnserver/proxyconnect.go +++ b/ipn/ipnserver/proxyconnect.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js -// +build !js package ipnserver diff --git a/ipn/localapi/cert.go b/ipn/localapi/cert.go index 6e136c95a..6e281d072 100644 --- a/ipn/localapi/cert.go +++ b/ipn/localapi/cert.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !android && !js -// +build !ios,!android,!js package localapi diff --git a/ipn/localapi/cert_test.go b/ipn/localapi/cert_test.go index ee896f440..fe460bcae 100644 --- a/ipn/localapi/cert_test.go +++ b/ipn/localapi/cert_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !android && !js -// +build !ios,!android,!js package localapi diff --git a/ipn/localapi/disabled_stubs.go b/ipn/localapi/disabled_stubs.go index 6aa19b316..0c762ed3d 100644 --- a/ipn/localapi/disabled_stubs.go +++ b/ipn/localapi/disabled_stubs.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ios || android || js -// +build ios android js package localapi diff --git a/ipn/localapi/profile.go b/ipn/localapi/profile.go index 0dd61d1c9..5854d0292 100644 --- a/ipn/localapi/profile.go +++ b/ipn/localapi/profile.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !android && !js -// +build !ios,!android,!js // We don't include it on mobile where we're more memory constrained and // there's no CLI to get at the results anyway. diff --git a/ipn/store/awsstore/store_aws.go b/ipn/store/awsstore/store_aws.go index 6fe8dcf6f..575cf826a 100644 --- a/ipn/store/awsstore/store_aws.go +++ b/ipn/store/awsstore/store_aws.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !ts_omit_aws -// +build linux,!ts_omit_aws // Package awsstore contains an ipn.StateStore implementation using AWS SSM. package awsstore diff --git a/ipn/store/awsstore/store_aws_stub.go b/ipn/store/awsstore/store_aws_stub.go index d21a650b2..6e9dab1cb 100644 --- a/ipn/store/awsstore/store_aws_stub.go +++ b/ipn/store/awsstore/store_aws_stub.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux || ts_omit_aws -// +build !linux ts_omit_aws package awsstore diff --git a/ipn/store/awsstore/store_aws_test.go b/ipn/store/awsstore/store_aws_test.go index 979dd7f18..5fd2dc904 100644 --- a/ipn/store/awsstore/store_aws_test.go +++ b/ipn/store/awsstore/store_aws_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package awsstore diff --git a/log/logheap/logheap.go b/log/logheap/logheap.go index 2eb6a4924..7112a794a 100644 --- a/log/logheap/logheap.go +++ b/log/logheap/logheap.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js -// +build !js // Package logheap logs a heap pprof profile. package logheap diff --git a/logtail/filch/filch_unix.go b/logtail/filch/filch_unix.go index be18e1432..b404e7532 100644 --- a/logtail/filch/filch_unix.go +++ b/logtail/filch/filch_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !js -// +build !windows,!js package filch diff --git a/metrics/fds_notlinux.go b/metrics/fds_notlinux.go index 87cc8e4a0..50c7dfaf4 100644 --- a/metrics/fds_notlinux.go +++ b/metrics/fds_notlinux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux -// +build !linux package metrics diff --git a/net/dns/debian_resolvconf.go b/net/dns/debian_resolvconf.go index 8a49e282f..2ebb33706 100644 --- a/net/dns/debian_resolvconf.go +++ b/net/dns/debian_resolvconf.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || freebsd || openbsd -// +build linux freebsd openbsd package dns diff --git a/net/dns/flush_default.go b/net/dns/flush_default.go index c8452383e..1c28851fc 100644 --- a/net/dns/flush_default.go +++ b/net/dns/flush_default.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package dns diff --git a/net/dns/ini.go b/net/dns/ini.go index af852f5a7..c8ae5f0cd 100644 --- a/net/dns/ini.go +++ b/net/dns/ini.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package dns diff --git a/net/dns/ini_test.go b/net/dns/ini_test.go index c47c234bb..c7c9f8eeb 100644 --- a/net/dns/ini_test.go +++ b/net/dns/ini_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package dns diff --git a/net/dns/manager_default.go b/net/dns/manager_default.go index 4bc40ef62..8dfce78ab 100644 --- a/net/dns/manager_default.go +++ b/net/dns/manager_default.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && !freebsd && !openbsd && !windows && !darwin -// +build !linux,!freebsd,!openbsd,!windows,!darwin package dns diff --git a/net/dns/nm.go b/net/dns/nm.go index c2ad5b95a..11474532f 100644 --- a/net/dns/nm.go +++ b/net/dns/nm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package dns diff --git a/net/dns/openresolv.go b/net/dns/openresolv.go index 13b72438f..51cf43034 100644 --- a/net/dns/openresolv.go +++ b/net/dns/openresolv.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || freebsd || openbsd -// +build linux freebsd openbsd package dns diff --git a/net/dns/resolvconf.go b/net/dns/resolvconf.go index d59f2117d..b317b3bd4 100644 --- a/net/dns/resolvconf.go +++ b/net/dns/resolvconf.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || freebsd || openbsd -// +build linux freebsd openbsd package dns diff --git a/net/dns/resolvd.go b/net/dns/resolvd.go index 1b68285c4..bc2b7de85 100644 --- a/net/dns/resolvd.go +++ b/net/dns/resolvd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build openbsd -// +build openbsd package dns diff --git a/net/dns/resolved.go b/net/dns/resolved.go index 07b008b34..3b3838dc5 100644 --- a/net/dns/resolved.go +++ b/net/dns/resolved.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package dns diff --git a/net/dns/resolver/macios_ext.go b/net/dns/resolver/macios_ext.go index e1e60765a..1e7101fdf 100644 --- a/net/dns/resolver/macios_ext.go +++ b/net/dns/resolver/macios_ext.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build ts_macext && (darwin || ios) -// +build ts_macext -// +build darwin ios package resolver diff --git a/net/dnsfallback/update-dns-fallbacks.go b/net/dnsfallback/update-dns-fallbacks.go index 279293b85..be3e92255 100644 --- a/net/dnsfallback/update-dns-fallbacks.go +++ b/net/dnsfallback/update-dns-fallbacks.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore package main diff --git a/net/interfaces/interfaces_bsd.go b/net/interfaces/interfaces_bsd.go index 4a5af8bc2..970f64278 100644 --- a/net/interfaces/interfaces_bsd.go +++ b/net/interfaces/interfaces_bsd.go @@ -6,7 +6,6 @@ // BSD systems (e.g. OpenBSD) but has not been tested. //go:build darwin || freebsd -// +build darwin freebsd package interfaces diff --git a/net/interfaces/interfaces_default_route_test.go b/net/interfaces/interfaces_default_route_test.go index 05be6373b..c1cc6aee5 100644 --- a/net/interfaces/interfaces_default_route_test.go +++ b/net/interfaces/interfaces_default_route_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || (darwin && !ts_macext) -// +build linux darwin,!ts_macext package interfaces diff --git a/net/interfaces/interfaces_defaultrouteif_todo.go b/net/interfaces/interfaces_defaultrouteif_todo.go index cd873ef48..d695ea057 100644 --- a/net/interfaces/interfaces_defaultrouteif_todo.go +++ b/net/interfaces/interfaces_defaultrouteif_todo.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && !windows && !darwin && !freebsd -// +build !linux,!windows,!darwin,!freebsd package interfaces diff --git a/net/interfaces/interfaces_freebsd.go b/net/interfaces/interfaces_freebsd.go index 8a7270071..4756840d8 100644 --- a/net/interfaces/interfaces_freebsd.go +++ b/net/interfaces/interfaces_freebsd.go @@ -5,7 +5,6 @@ // This might work on other BSDs, but only tested on FreeBSD. //go:build freebsd -// +build freebsd package interfaces diff --git a/net/netns/netns_android.go b/net/netns/netns_android.go index 9b28e924e..cfa88a517 100644 --- a/net/netns/netns_android.go +++ b/net/netns/netns_android.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build android -// +build android package netns diff --git a/net/netns/netns_darwin_tailscaled.go b/net/netns/netns_darwin_tailscaled.go index ce35aa999..4731dbd88 100644 --- a/net/netns/netns_darwin_tailscaled.go +++ b/net/netns/netns_darwin_tailscaled.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ts_macext -// +build darwin,!ts_macext package netns diff --git a/net/netns/netns_default.go b/net/netns/netns_default.go index 009cd01c1..bc841e4ab 100644 --- a/net/netns/netns_default.go +++ b/net/netns/netns_default.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (!linux && !windows && !darwin) || (darwin && ts_macext) -// +build !linux,!windows,!darwin darwin,ts_macext package netns diff --git a/net/netns/netns_linux.go b/net/netns/netns_linux.go index 2f5403012..dbbf8d46f 100644 --- a/net/netns/netns_linux.go +++ b/net/netns/netns_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !android -// +build linux,!android package netns diff --git a/net/netns/netns_macios.go b/net/netns/netns_macios.go index 8b40a6859..6f5983962 100644 --- a/net/netns/netns_macios.go +++ b/net/netns/netns_macios.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || ios -// +build darwin ios package netns diff --git a/net/netns/socks.go b/net/netns/socks.go index c64253d28..7a4239ac1 100644 --- a/net/netns/socks.go +++ b/net/netns/socks.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !js -// +build !ios,!js package netns diff --git a/net/netstat/netstat_noimpl.go b/net/netstat/netstat_noimpl.go index d8bbd6b2c..fc16661fd 100644 --- a/net/netstat/netstat_noimpl.go +++ b/net/netstat/netstat_noimpl.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package netstat diff --git a/net/portmapper/disabled_stubs.go b/net/portmapper/disabled_stubs.go index f738e6e28..4c5379e92 100644 --- a/net/portmapper/disabled_stubs.go +++ b/net/portmapper/disabled_stubs.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build js -// +build js package portmapper diff --git a/net/portmapper/upnp.go b/net/portmapper/upnp.go index 65f2c612f..b59ec4f40 100644 --- a/net/portmapper/upnp.go +++ b/net/portmapper/upnp.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js -// +build !js // (no raw sockets in JS/WASM) diff --git a/net/routetable/routetable_bsd.go b/net/routetable/routetable_bsd.go index f7aac214e..c4c4810a3 100644 --- a/net/routetable/routetable_bsd.go +++ b/net/routetable/routetable_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || freebsd -// +build darwin freebsd package routetable diff --git a/net/routetable/routetable_bsd_test.go b/net/routetable/routetable_bsd_test.go index f2f1733c2..eb87780ad 100644 --- a/net/routetable/routetable_bsd_test.go +++ b/net/routetable/routetable_bsd_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || freebsd -// +build darwin freebsd package routetable diff --git a/net/routetable/routetable_darwin.go b/net/routetable/routetable_darwin.go index e3ba95c44..dc8e50853 100644 --- a/net/routetable/routetable_darwin.go +++ b/net/routetable/routetable_darwin.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin -// +build darwin package routetable diff --git a/net/routetable/routetable_freebsd.go b/net/routetable/routetable_freebsd.go index ed9a46c81..ba4c68748 100644 --- a/net/routetable/routetable_freebsd.go +++ b/net/routetable/routetable_freebsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd -// +build freebsd package routetable diff --git a/net/routetable/routetable_linux.go b/net/routetable/routetable_linux.go index 45f012b7c..e7347fe1a 100644 --- a/net/routetable/routetable_linux.go +++ b/net/routetable/routetable_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package routetable diff --git a/net/routetable/routetable_linux_test.go b/net/routetable/routetable_linux_test.go index 5042e55e9..5892fcf13 100644 --- a/net/routetable/routetable_linux_test.go +++ b/net/routetable/routetable_linux_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package routetable diff --git a/net/stun/stun_fuzzer.go b/net/stun/stun_fuzzer.go index 42a818cd8..6bb66e8a9 100644 --- a/net/stun/stun_fuzzer.go +++ b/net/stun/stun_fuzzer.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build gofuzz -// +build gofuzz package stun diff --git a/net/tlsdial/deps_test.go b/net/tlsdial/deps_test.go index 6c34c9bd7..6a74d7dc0 100644 --- a/net/tlsdial/deps_test.go +++ b/net/tlsdial/deps_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build for_go_mod_tidy_only -// +build for_go_mod_tidy_only package tlsdial diff --git a/net/tsdial/peerapi_macios_ext.go b/net/tsdial/peerapi_macios_ext.go index 523ddc16d..47e8b36a3 100644 --- a/net/tsdial/peerapi_macios_ext.go +++ b/net/tsdial/peerapi_macios_ext.go @@ -7,8 +7,6 @@ // and System Extension). It's not used on tailscaled-on-macOS. //go:build ts_macext && (darwin || ios) -// +build ts_macext -// +build darwin ios package tsdial diff --git a/net/tshttpproxy/tshttpproxy_future.go b/net/tshttpproxy/tshttpproxy_future.go index 9d9b37cb9..dbb6f23cc 100644 --- a/net/tshttpproxy/tshttpproxy_future.go +++ b/net/tshttpproxy/tshttpproxy_future.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build tailscale_go -// +build tailscale_go // We want to use https://github.com/golang/go/issues/41048 but it's only in the // Tailscale Go tree for now. Hence the build tag above. diff --git a/net/tshttpproxy/tshttpproxy_linux.go b/net/tshttpproxy/tshttpproxy_linux.go index dac47e465..f82fe0878 100644 --- a/net/tshttpproxy/tshttpproxy_linux.go +++ b/net/tshttpproxy/tshttpproxy_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package tshttpproxy diff --git a/net/tshttpproxy/tshttpproxy_synology.go b/net/tshttpproxy/tshttpproxy_synology.go index bf33abf78..f9ff6a999 100644 --- a/net/tshttpproxy/tshttpproxy_synology.go +++ b/net/tshttpproxy/tshttpproxy_synology.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package tshttpproxy diff --git a/net/tshttpproxy/tshttpproxy_synology_test.go b/net/tshttpproxy/tshttpproxy_synology_test.go index 8fe7e78b8..2a7798923 100644 --- a/net/tshttpproxy/tshttpproxy_synology_test.go +++ b/net/tshttpproxy/tshttpproxy_synology_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package tshttpproxy diff --git a/net/tstun/ifstatus_noop.go b/net/tstun/ifstatus_noop.go index e00f81098..bd1e7bf15 100644 --- a/net/tstun/ifstatus_noop.go +++ b/net/tstun/ifstatus_noop.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package tstun diff --git a/net/tstun/linkattrs_notlinux.go b/net/tstun/linkattrs_notlinux.go index 5acf9e019..716b85c73 100644 --- a/net/tstun/linkattrs_notlinux.go +++ b/net/tstun/linkattrs_notlinux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux -// +build !linux package tstun diff --git a/net/tstun/tap_unsupported.go b/net/tstun/tap_unsupported.go index 5c6da1310..4b63d1883 100644 --- a/net/tstun/tap_unsupported.go +++ b/net/tstun/tap_unsupported.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux -// +build !linux package tstun diff --git a/net/tstun/tun.go b/net/tstun/tun.go index 5a9d96ca5..9524dcd65 100644 --- a/net/tstun/tun.go +++ b/net/tstun/tun.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js -// +build !js // Package tun creates a tuntap device, working around OS-specific // quirks if necessary. diff --git a/net/tstun/tun_macos.go b/net/tstun/tun_macos.go index 58b7c68f1..e72d2ecd0 100644 --- a/net/tstun/tun_macos.go +++ b/net/tstun/tun_macos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package tstun diff --git a/net/tstun/tun_notwindows.go b/net/tstun/tun_notwindows.go index 90cc56007..73eb8fdaa 100644 --- a/net/tstun/tun_notwindows.go +++ b/net/tstun/tun_notwindows.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package tstun diff --git a/paths/paths_unix.go b/paths/paths_unix.go index baa8c4636..e011c74e4 100644 --- a/paths/paths_unix.go +++ b/paths/paths_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !js -// +build !windows,!js package paths diff --git a/portlist/netstat.go b/portlist/netstat.go index 41e775b4f..ebfd5fb60 100644 --- a/portlist/netstat.go +++ b/portlist/netstat.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !js -// +build !ios,!js package portlist diff --git a/portlist/netstat_exec.go b/portlist/netstat_exec.go index d308d7a93..25e23b8f6 100644 --- a/portlist/netstat_exec.go +++ b/portlist/netstat_exec.go @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build (windows || freebsd || openbsd || darwin) && !ios && !js -// +build windows freebsd openbsd darwin -// +build !ios -// +build !js package portlist diff --git a/portlist/netstat_test.go b/portlist/netstat_test.go index ecf9f8c11..1887e2c95 100644 --- a/portlist/netstat_test.go +++ b/portlist/netstat_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !js -// +build !ios,!js package portlist diff --git a/portlist/portlist_ios.go b/portlist/portlist_ios.go index 3970ecde2..cb60054fd 100644 --- a/portlist/portlist_ios.go +++ b/portlist/portlist_ios.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ios -// +build ios package portlist diff --git a/portlist/portlist_macos.go b/portlist/portlist_macos.go index f79c7756f..eabc58428 100644 --- a/portlist/portlist_macos.go +++ b/portlist/portlist_macos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package portlist diff --git a/portlist/portlist_other.go b/portlist/portlist_other.go index 8f8e06706..12925ebfc 100644 --- a/portlist/portlist_other.go +++ b/portlist/portlist_other.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && !windows && !darwin && !js -// +build !linux,!windows,!darwin,!js package portlist diff --git a/safesocket/safesocket_ps.go b/safesocket/safesocket_ps.go index 8882d693d..5db1c0ece 100644 --- a/safesocket/safesocket_ps.go +++ b/safesocket/safesocket_ps.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || windows || darwin || freebsd -// +build linux windows darwin freebsd package safesocket diff --git a/safesocket/unixsocket.go b/safesocket/unixsocket.go index b4d361459..bb80708ca 100644 --- a/safesocket/unixsocket.go +++ b/safesocket/unixsocket.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !js -// +build !windows,!js package safesocket diff --git a/ssh/tailssh/incubator.go b/ssh/tailssh/incubator.go index f0c12436c..cbf81e5fc 100644 --- a/ssh/tailssh/incubator.go +++ b/ssh/tailssh/incubator.go @@ -9,7 +9,6 @@ // then launches the requested `--cmd`. //go:build linux || (darwin && !ios) -// +build linux darwin,!ios package tailssh diff --git a/ssh/tailssh/incubator_linux.go b/ssh/tailssh/incubator_linux.go index 4c8d03bd5..2a1c342e6 100644 --- a/ssh/tailssh/incubator_linux.go +++ b/ssh/tailssh/incubator_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package tailssh diff --git a/ssh/tailssh/tailssh.go b/ssh/tailssh/tailssh.go index 480fa4231..6582331e4 100644 --- a/ssh/tailssh/tailssh.go +++ b/ssh/tailssh/tailssh.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || (darwin && !ios) -// +build linux darwin,!ios // Package tailssh is an SSH server integrated into Tailscale. package tailssh diff --git a/ssh/tailssh/tailssh_test.go b/ssh/tailssh/tailssh_test.go index 2a3156358..16b487383 100644 --- a/ssh/tailssh/tailssh_test.go +++ b/ssh/tailssh/tailssh_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || darwin -// +build linux darwin package tailssh diff --git a/syncs/locked_test.go b/syncs/locked_test.go index 2e7b63704..7a06f413d 100644 --- a/syncs/locked_test.go +++ b/syncs/locked_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.13 && !go1.19 -// +build go1.13,!go1.19 package syncs diff --git a/tempfork/gliderlabs/ssh/context_test.go b/tempfork/gliderlabs/ssh/context_test.go index d7c0b2406..dcbd326b7 100644 --- a/tempfork/gliderlabs/ssh/context_test.go +++ b/tempfork/gliderlabs/ssh/context_test.go @@ -1,5 +1,4 @@ //go:build glidertests -// +build glidertests package ssh diff --git a/tempfork/gliderlabs/ssh/options_test.go b/tempfork/gliderlabs/ssh/options_test.go index 3d4415c38..7cf6f376c 100644 --- a/tempfork/gliderlabs/ssh/options_test.go +++ b/tempfork/gliderlabs/ssh/options_test.go @@ -1,5 +1,4 @@ //go:build glidertests -// +build glidertests package ssh diff --git a/tempfork/gliderlabs/ssh/server_test.go b/tempfork/gliderlabs/ssh/server_test.go index 113f477c8..177c07117 100644 --- a/tempfork/gliderlabs/ssh/server_test.go +++ b/tempfork/gliderlabs/ssh/server_test.go @@ -1,5 +1,4 @@ //go:build glidertests -// +build glidertests package ssh diff --git a/tempfork/gliderlabs/ssh/session_test.go b/tempfork/gliderlabs/ssh/session_test.go index 2a915c319..a60be5ec1 100644 --- a/tempfork/gliderlabs/ssh/session_test.go +++ b/tempfork/gliderlabs/ssh/session_test.go @@ -1,5 +1,4 @@ //go:build glidertests -// +build glidertests package ssh diff --git a/tempfork/gliderlabs/ssh/tcpip_test.go b/tempfork/gliderlabs/ssh/tcpip_test.go index 7ad23b7b5..8f330f611 100644 --- a/tempfork/gliderlabs/ssh/tcpip_test.go +++ b/tempfork/gliderlabs/ssh/tcpip_test.go @@ -1,5 +1,4 @@ //go:build glidertests -// +build glidertests package ssh diff --git a/tstest/archtest/qemu_test.go b/tstest/archtest/qemu_test.go index bac221877..15508fb6d 100644 --- a/tstest/archtest/qemu_test.go +++ b/tstest/archtest/qemu_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && amd64 && !race -// +build linux,amd64,!race package archtest diff --git a/tstest/integration/gen_deps.go b/tstest/integration/gen_deps.go index 330e46a63..26330f228 100644 --- a/tstest/integration/gen_deps.go +++ b/tstest/integration/gen_deps.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore package main diff --git a/tstest/integration/vms/dns_tester.go b/tstest/integration/vms/dns_tester.go index 4c9b1b50a..014ec9044 100644 --- a/tstest/integration/vms/dns_tester.go +++ b/tstest/integration/vms/dns_tester.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // Command dns_tester exists in order to perform tests of our DNS // configuration stack. This was written because the state of DNS diff --git a/tstest/integration/vms/harness_test.go b/tstest/integration/vms/harness_test.go index 5785635cf..e5c45fdfd 100644 --- a/tstest/integration/vms/harness_test.go +++ b/tstest/integration/vms/harness_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package vms diff --git a/tstest/integration/vms/nixos_test.go b/tstest/integration/vms/nixos_test.go index 2ba56cbda..8b12f321e 100644 --- a/tstest/integration/vms/nixos_test.go +++ b/tstest/integration/vms/nixos_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package vms diff --git a/tstest/integration/vms/top_level_test.go b/tstest/integration/vms/top_level_test.go index 2da4912a6..fc38de39d 100644 --- a/tstest/integration/vms/top_level_test.go +++ b/tstest/integration/vms/top_level_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package vms diff --git a/tstest/integration/vms/udp_tester.go b/tstest/integration/vms/udp_tester.go index a00e614d6..a1ade2a64 100644 --- a/tstest/integration/vms/udp_tester.go +++ b/tstest/integration/vms/udp_tester.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // Command udp_tester exists because all of these distros being tested don't // have a consistent tool for doing UDP traffic. This is a very hacked up tool diff --git a/tstest/integration/vms/vm_setup_test.go b/tstest/integration/vms/vm_setup_test.go index 7c3e61d4d..1666bc603 100644 --- a/tstest/integration/vms/vm_setup_test.go +++ b/tstest/integration/vms/vm_setup_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package vms diff --git a/tstest/integration/vms/vms_steps_test.go b/tstest/integration/vms/vms_steps_test.go index 5fb4b6b42..9081eeb80 100644 --- a/tstest/integration/vms/vms_steps_test.go +++ b/tstest/integration/vms/vms_steps_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package vms diff --git a/tstest/integration/vms/vms_test.go b/tstest/integration/vms/vms_test.go index aaa29df4a..6b695fcb7 100644 --- a/tstest/integration/vms/vms_test.go +++ b/tstest/integration/vms/vms_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package vms diff --git a/tstest/iosdeps/iosdeps_test.go b/tstest/iosdeps/iosdeps_test.go index afb33cdaa..50719c3b2 100644 --- a/tstest/iosdeps/iosdeps_test.go +++ b/tstest/iosdeps/iosdeps_test.go @@ -6,7 +6,6 @@ // worry about "go.exe" etc. //go:build !windows -// +build !windows package iosdeps diff --git a/tstest/jsdeps/jsdeps_test.go b/tstest/jsdeps/jsdeps_test.go index 7d50777f8..f89146011 100644 --- a/tstest/jsdeps/jsdeps_test.go +++ b/tstest/jsdeps/jsdeps_test.go @@ -6,7 +6,6 @@ // worry about "go.exe" etc. //go:build !windows -// +build !windows package jsdeps diff --git a/tstest/tools/tools.go b/tstest/tools/tools.go index 54c78818d..6ffe23600 100644 --- a/tstest/tools/tools.go +++ b/tstest/tools/tools.go @@ -6,7 +6,6 @@ // tool modules from our go.mod. //go:build tools -// +build tools package tools diff --git a/tstime/rate/rate_test.go b/tstime/rate/rate_test.go index ced78b040..90fd556be 100644 --- a/tstime/rate/rate_test.go +++ b/tstime/rate/rate_test.go @@ -9,7 +9,6 @@ // license that can be found in the LICENSE file. //go:build go1.7 -// +build go1.7 package rate diff --git a/types/logger/rusage_stub.go b/types/logger/rusage_stub.go index 3a9202d1c..42114ba17 100644 --- a/types/logger/rusage_stub.go +++ b/types/logger/rusage_stub.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows || js -// +build windows js package logger diff --git a/types/logger/rusage_syscall.go b/types/logger/rusage_syscall.go index ad1f39411..e2901bb80 100644 --- a/types/logger/rusage_syscall.go +++ b/types/logger/rusage_syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !js -// +build !windows,!js package logger diff --git a/util/cstruct/cstruct_example_test.go b/util/cstruct/cstruct_example_test.go index 38511e777..1a2a97939 100644 --- a/util/cstruct/cstruct_example_test.go +++ b/util/cstruct/cstruct_example_test.go @@ -5,7 +5,6 @@ // Only built on 64-bit platforms to avoid complexity //go:build amd64 || arm64 || mips64le || ppc64le || riscv64 -// +build amd64 arm64 mips64le ppc64le riscv64 package cstruct diff --git a/util/endian/big.go b/util/endian/big.go index 3cfa2535d..1a6bf9a82 100644 --- a/util/endian/big.go +++ b/util/endian/big.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build mips || mips64 || ppc64 || s390x -// +build mips mips64 ppc64 s390x package endian diff --git a/util/endian/little.go b/util/endian/little.go index 22a77e25c..6cbc1a226 100644 --- a/util/endian/little.go +++ b/util/endian/little.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 || amd64 || arm || arm64 || mips64le || mipsle || ppc64le || riscv64 || wasm -// +build 386 amd64 arm arm64 mips64le mipsle ppc64le riscv64 wasm package endian diff --git a/util/osshare/filesharingstatus_noop.go b/util/osshare/filesharingstatus_noop.go index eb038567b..953c470b6 100644 --- a/util/osshare/filesharingstatus_noop.go +++ b/util/osshare/filesharingstatus_noop.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package osshare diff --git a/util/osshare/filesharingstatus_windows.go b/util/osshare/filesharingstatus_windows.go index 537889ff6..f0cea5b57 100644 --- a/util/osshare/filesharingstatus_windows.go +++ b/util/osshare/filesharingstatus_windows.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package osshare diff --git a/util/pidowner/pidowner_noimpl.go b/util/pidowner/pidowner_noimpl.go index 77d1c973e..054666ef9 100644 --- a/util/pidowner/pidowner_noimpl.go +++ b/util/pidowner/pidowner_noimpl.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !linux -// +build !windows,!linux package pidowner diff --git a/util/racebuild/off.go b/util/racebuild/off.go index b474895c7..46a01c39b 100644 --- a/util/racebuild/off.go +++ b/util/racebuild/off.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !race -// +build !race package racebuild diff --git a/util/racebuild/on.go b/util/racebuild/on.go index eb88c5b19..768a4039b 100644 --- a/util/racebuild/on.go +++ b/util/racebuild/on.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build race -// +build race package racebuild diff --git a/util/systemd/systemd_linux.go b/util/systemd/systemd_linux.go index aac97814d..aefed2087 100644 --- a/util/systemd/systemd_linux.go +++ b/util/systemd/systemd_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package systemd diff --git a/util/systemd/systemd_nonlinux.go b/util/systemd/systemd_nonlinux.go index 29f721fd6..0aa221786 100644 --- a/util/systemd/systemd_nonlinux.go +++ b/util/systemd/systemd_nonlinux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux -// +build !linux package systemd diff --git a/util/winutil/winutil_notwindows.go b/util/winutil/winutil_notwindows.go index 64bdfec47..76c858e19 100644 --- a/util/winutil/winutil_notwindows.go +++ b/util/winutil/winutil_notwindows.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows -// +build !windows package winutil diff --git a/version/cmdname.go b/version/cmdname.go index d712902aa..ea5932197 100644 --- a/version/cmdname.go +++ b/version/cmdname.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios -// +build !ios package version diff --git a/version/cmdname_ios.go b/version/cmdname_ios.go index 9c1aaa5e4..26e8d8b2e 100644 --- a/version/cmdname_ios.go +++ b/version/cmdname_ios.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ios -// +build ios package version diff --git a/version/race.go b/version/race.go index 6d8d5552d..d5b3a24c4 100644 --- a/version/race.go +++ b/version/race.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build race -// +build race package version diff --git a/version/race_off.go b/version/race_off.go index 355f48b65..b34c5baf9 100644 --- a/version/race_off.go +++ b/version/race_off.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !race -// +build !race package version diff --git a/wf/firewall.go b/wf/firewall.go index c439f89cf..abe76a987 100644 --- a/wf/firewall.go +++ b/wf/firewall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package wf diff --git a/wgengine/magicsock/debugknobs.go b/wgengine/magicsock/debugknobs.go index 7b7c374b0..54c554898 100644 --- a/wgengine/magicsock/debugknobs.go +++ b/wgengine/magicsock/debugknobs.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ios && !js -// +build !ios,!js package magicsock diff --git a/wgengine/magicsock/debugknobs_stubs.go b/wgengine/magicsock/debugknobs_stubs.go index 79f84b43f..9c2214698 100644 --- a/wgengine/magicsock/debugknobs_stubs.go +++ b/wgengine/magicsock/debugknobs_stubs.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ios || js -// +build ios js package magicsock diff --git a/wgengine/magicsock/magicsock_default.go b/wgengine/magicsock/magicsock_default.go index fe013a90b..5668f8aaa 100644 --- a/wgengine/magicsock/magicsock_default.go +++ b/wgengine/magicsock/magicsock_default.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux -// +build !linux package magicsock diff --git a/wgengine/magicsock/magicsock_unix_test.go b/wgengine/magicsock/magicsock_unix_test.go index 5e688ecfa..9df9a3735 100644 --- a/wgengine/magicsock/magicsock_unix_test.go +++ b/wgengine/magicsock/magicsock_unix_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build unix -// +build unix package magicsock diff --git a/wgengine/monitor/monitor_linux.go b/wgengine/monitor/monitor_linux.go index b6d1188bb..9b490903b 100644 --- a/wgengine/monitor/monitor_linux.go +++ b/wgengine/monitor/monitor_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !android -// +build !android package monitor diff --git a/wgengine/monitor/monitor_polling.go b/wgengine/monitor/monitor_polling.go index b4c1eb15d..b625878d9 100644 --- a/wgengine/monitor/monitor_polling.go +++ b/wgengine/monitor/monitor_polling.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (!linux && !freebsd && !windows && !darwin) || android -// +build !linux,!freebsd,!windows,!darwin android package monitor diff --git a/wgengine/monitor/polling.go b/wgengine/monitor/polling.go index 2ec5383a3..42794bdd7 100644 --- a/wgengine/monitor/polling.go +++ b/wgengine/monitor/polling.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !darwin -// +build !windows,!darwin package monitor diff --git a/wgengine/router/router_default.go b/wgengine/router/router_default.go index 9f2e9aa46..99b31084f 100644 --- a/wgengine/router/router_default.go +++ b/wgengine/router/router_default.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !linux && !darwin && !openbsd && !freebsd -// +build !windows,!linux,!darwin,!openbsd,!freebsd package router diff --git a/wgengine/router/router_userspace_bsd.go b/wgengine/router/router_userspace_bsd.go index a5cb39500..d234a3e05 100644 --- a/wgengine/router/router_userspace_bsd.go +++ b/wgengine/router/router_userspace_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || freebsd -// +build darwin freebsd package router diff --git a/wgengine/router/runner.go b/wgengine/router/runner.go index 736b54b6c..a22c11654 100644 --- a/wgengine/router/runner.go +++ b/wgengine/router/runner.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package router diff --git a/wgengine/watchdog.go b/wgengine/watchdog.go index 46260221f..8fd2d4484 100644 --- a/wgengine/watchdog.go +++ b/wgengine/watchdog.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !js -// +build !js package wgengine diff --git a/wgengine/winnet/winnet.go b/wgengine/winnet/winnet.go index a2abc9791..bbe5bf563 100644 --- a/wgengine/winnet/winnet.go +++ b/wgengine/winnet/winnet.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package winnet