all: gofmt with Go 1.17

This adds "//go:build" lines and tidies up existing "// +build" lines.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
main
Josh Bleecher Snyder 5 years ago committed by Josh Bleecher Snyder
parent a729070252
commit a5da4ed981
  1. 1
      cmd/tailscale/cli/diag.go
  2. 1
      cmd/tailscale/cli/diag_other.go
  3. 1
      cmd/tailscaled/tailscaled_notwindows.go
  4. 1
      cmd/tsshd/tsshd.go
  5. 1
      cmd/tsshd/tsshd_windows.go
  6. 1
      control/controlclient/hostinfo_linux.go
  7. 1
      control/controlclient/sign_supported.go
  8. 1
      control/controlclient/sign_unsupported.go
  9. 1
      disco/disco_fuzzer.go
  10. 1
      ipn/ipnlocal/peerapi_macios_ext.go
  11. 3
      logtail/filch/filch_unix.go
  12. 1
      net/dns/debian_resolvconf.go
  13. 1
      net/dns/ini.go
  14. 1
      net/dns/ini_test.go
  15. 1
      net/dns/manager_default.go
  16. 1
      net/dns/nm.go
  17. 1
      net/dns/openresolv.go
  18. 1
      net/dns/resolvconf.go
  19. 1
      net/dns/resolved.go
  20. 1
      net/dns/resolver/macios_ext.go
  21. 1
      net/dns/resolver/neterr_other.go
  22. 1
      net/dnsfallback/update-dns-fallbacks.go
  23. 1
      net/interfaces/interfaces_default_route_test.go
  24. 1
      net/interfaces/interfaces_defaultrouteif_todo.go
  25. 1
      net/netns/netns_android.go
  26. 1
      net/netns/netns_darwin_tailscaled.go
  27. 1
      net/netns/netns_default.go
  28. 1
      net/netns/netns_linux.go
  29. 1
      net/netns/netns_macios.go
  30. 1
      net/netns/socks.go
  31. 1
      net/netstat/netstat_noimpl.go
  32. 2
      net/portmapper/disabled_stubs.go
  33. 2
      net/portmapper/upnp.go
  34. 1
      net/stun/stun_fuzzer.go
  35. 1
      net/tshttpproxy/tshttpproxy_future.go
  36. 1
      net/tstun/ifstatus_noop.go
  37. 1
      net/tstun/tap_unsupported.go
  38. 1
      net/tstun/tun_notwindows.go
  39. 1
      paths/paths_unix.go
  40. 1
      portlist/netstat.go
  41. 1
      portlist/netstat_exec.go
  42. 1
      portlist/portlist_ios.go
  43. 1
      portlist/portlist_macos.go
  44. 1
      portlist/portlist_other.go
  45. 1
      safesocket/unixsocket.go
  46. 1
      syncs/locked.go
  47. 1
      syncs/locked_test.go
  48. 1
      tempfork/wireguard-windows/firewall/blocker.go
  49. 1
      tempfork/wireguard-windows/firewall/helpers.go
  50. 1
      tempfork/wireguard-windows/firewall/rules.go
  51. 1
      tempfork/wireguard-windows/firewall/types_windows.go
  52. 1
      tempfork/wireguard-windows/firewall/types_windows_32.go
  53. 1
      tempfork/wireguard-windows/firewall/types_windows_64.go
  54. 1
      tempfork/wireguard-windows/firewall/types_windows_test.go
  55. 1
      tstest/integration/gen_deps.go
  56. 1
      tstest/integration/vms/derive_bindhost_test.go
  57. 1
      tstest/integration/vms/distros_test.go
  58. 1
      tstest/integration/vms/harness_test.go
  59. 1
      tstest/integration/vms/nixos_test.go
  60. 1
      tstest/integration/vms/opensuse_leap_15_1_test.go
  61. 1
      tstest/integration/vms/top_level_test.go
  62. 1
      tstest/integration/vms/udp_tester.go
  63. 1
      tstest/integration/vms/vm_setup_test.go
  64. 1
      tstest/integration/vms/vms_steps_test.go
  65. 1
      tstest/integration/vms/vms_test.go
  66. 1
      types/logger/rusage_nowindows.go
  67. 1
      util/deephash/mapiter.go
  68. 1
      util/deephash/mapiter_future.go
  69. 1
      util/endian/big.go
  70. 1
      util/endian/little.go
  71. 1
      util/groupmember/groupmember_cgo.go
  72. 1
      util/groupmember/groupmember_noimpl.go
  73. 1
      util/groupmember/groupmember_notcgo.go
  74. 1
      util/osshare/filesharingstatus_noop.go
  75. 1
      util/osshare/filesharingstatus_windows.go
  76. 1
      util/pidowner/pidowner_noimpl.go
  77. 1
      util/racebuild/off.go
  78. 1
      util/racebuild/on.go
  79. 1
      util/systemd/systemd_linux.go
  80. 1
      util/systemd/systemd_nonlinux.go
  81. 1
      util/winutil/winutil.go
  82. 1
      util/winutil/winutil_notwindows.go
  83. 1
      version/cmdname.go
  84. 1
      version/cmdname_ios.go
  85. 1
      version/race.go
  86. 1
      version/race_off.go
  87. 1
      wgengine/monitor/monitor_linux.go
  88. 1
      wgengine/monitor/monitor_polling.go
  89. 3
      wgengine/monitor/polling.go
  90. 1
      wgengine/router/router_default.go
  91. 1
      wgengine/router/router_test.go
  92. 1
      wgengine/router/router_userspace_bsd.go
  93. 1
      wgengine/router/runner.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 || windows || darwin
// +build linux windows darwin
package cli

@ -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 && !windows && !darwin
// +build !linux,!windows,!darwin
package cli

@ -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 !windows
// +build !windows
package main // import "tailscale.com/cmd/tailscaled"

@ -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 !windows
// +build !windows
// The tsshd binary is an SSH server that accepts connections

@ -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 windows
// +build windows
package main

@ -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 && !android
// +build linux,!android
package controlclient

@ -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 windows && cgo
// +build windows,cgo
// darwin,cgo is also supported by certstore but machineCertificateSubject will

@ -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 !windows || !cgo
// +build !windows !cgo
package controlclient

@ -1,6 +1,7 @@
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// 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

@ -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 && ts_macext) || (ios && ts_macext)
// +build darwin,ts_macext ios,ts_macext
package ipnlocal

@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//+build !windows
//go:build !windows
// +build !windows
package filch

@ -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 || freebsd || openbsd
// +build linux freebsd openbsd
package dns

@ -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 windows
// +build windows
package dns

@ -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 windows
// +build windows
package dns

@ -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 && !freebsd && !openbsd && !windows
// +build !linux,!freebsd,!openbsd,!windows
package dns

@ -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 dns

@ -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 || freebsd || openbsd
// +build linux freebsd openbsd
package dns

@ -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 || freebsd || openbsd
// +build linux freebsd openbsd
package dns

@ -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 dns

@ -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 && ts_macext) || (ios && ts_macext)
// +build darwin,ts_macext ios,ts_macext
package resolver

@ -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 && !windows
// +build !darwin,!windows
package resolver

@ -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

@ -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 || (darwin && !ts_macext)
// +build linux darwin,!ts_macext
package interfaces

@ -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 && !windows && !darwin
// +build !linux,!windows,!darwin
package interfaces

@ -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 android
// +build android
package netns

@ -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 && !ts_macext
// +build darwin,!ts_macext
package netns

@ -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 && !windows && !darwin) || (darwin && ts_macext)
// +build !linux,!windows,!darwin darwin,ts_macext
package netns

@ -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 && !android
// +build linux,!android
package netns

@ -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 || ios
// +build darwin ios
package netns

@ -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 !ios
// +build !ios
package netns

@ -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 !windows
// +build !windows
package netstat

@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build ios
// +build ios
// (https://github.com/tailscale/tailscale/issues/2495)
package portmapper

@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !ios
// +build !ios
// (https://github.com/tailscale/tailscale/issues/2495)
package portmapper

@ -1,6 +1,7 @@
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// 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

@ -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 tailscale_go
// +build tailscale_go
// We want to use https://github.com/golang/go/issues/41048 but it's only in the

@ -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 !windows
// +build !windows
package tstun

@ -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 tstun

@ -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 !windows
// +build !windows
package tstun

@ -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 !windows
// +build !windows
package paths

@ -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.16 && !ios) || (!go1.16 && !darwin) || (!go1.16 && !arm64)
// +build go1.16,!ios !go1.16,!darwin !go1.16,!arm64
package portlist

@ -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 (windows || freebsd || openbsd || (darwin && go1.16) || (darwin && !go1.16 && !arm64)) && !ios
// +build windows freebsd openbsd darwin,go1.16 darwin,!go1.16,!arm64
// +build !ios

@ -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.16 && ios) || (!go1.16 && darwin && !amd64)
// +build go1.16,ios !go1.16,darwin,!amd64
package portlist

@ -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 && amd64 && !go1.16) || (darwin && go1.16)) && !ios
// +build darwin,amd64,!go1.16 darwin,go1.16
// +build !ios

@ -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 && !windows && !darwin
// +build !linux,!windows,!darwin
package portlist

@ -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 !windows
// +build !windows
package safesocket

@ -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.13 && !go1.16
// +build go1.13,!go1.16
// This file makes assumptions about the inner workings of sync.Mutex and sync.RWMutex.

@ -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.13 && !go1.16
// +build go1.13,!go1.16
package syncs

@ -1,3 +1,4 @@
//go:build windows
// +build windows
/* SPDX-License-Identifier: MIT

@ -1,3 +1,4 @@
//go:build windows
// +build windows
/* SPDX-License-Identifier: MIT

@ -1,3 +1,4 @@
//go:build windows
// +build windows
/* SPDX-License-Identifier: MIT

@ -1,3 +1,4 @@
//go:build windows
// +build windows
/* SPDX-License-Identifier: MIT

@ -1,3 +1,4 @@
//go:build (windows && 386) || (windows && arm)
// +build windows,386 windows,arm
/* SPDX-License-Identifier: MIT

@ -1,3 +1,4 @@
//go:build (windows && amd64) || (windows && arm64)
// +build windows,amd64 windows,arm64
/* SPDX-License-Identifier: MIT

@ -1,3 +1,4 @@
//go:build windows
// +build windows
/* SPDX-License-Identifier: MIT

@ -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

@ -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 vms

@ -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 vms

@ -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 vms

@ -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 vms

@ -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 vms

@ -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 vms

@ -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
// Command udp_tester exists because all of these distros being tested don't

@ -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 vms

@ -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 vms

@ -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 vms

@ -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 !windows
// +build !windows
package logger

@ -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 !tailscale_go
// +build !tailscale_go
package deephash

@ -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 tailscale_go
// +build tailscale_go
package deephash

@ -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 mips || mips64 || ppc64 || s390x
// +build mips mips64 ppc64 s390x
package endian

@ -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 386 || amd64 || arm || arm64 || mips64le || mipsle || ppc64le || riscv64 || wasm
// +build 386 amd64 arm arm64 mips64le mipsle ppc64le riscv64 wasm
package endian

@ -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 cgo
// +build cgo
package groupmember

@ -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 !cgo && !linux && !darwin
// +build !cgo,!linux,!darwin
package groupmember

@ -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 !cgo && (linux || darwin)
// +build !cgo
// +build linux darwin

@ -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 !windows
// +build !windows
package osshare

@ -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 windows
// +build windows
package osshare

@ -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 !windows && !linux
// +build !windows,!linux
package pidowner

@ -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 racebuild

@ -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 racebuild

@ -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 systemd

@ -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 systemd

@ -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 windows
// +build windows
// Package winuntil contains misc Windows/win32 helper functions.

@ -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 !windows
// +build !windows
package winutil

@ -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.16 && !ios) || (!go1.16 && !darwin) || (!go1.16 && !arm64)
// +build go1.16,!ios !go1.16,!darwin !go1.16,!arm64
package version

@ -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.16 && ios) || (!go1.16 && darwin && arm64)
// +build go1.16,ios !go1.16,darwin,arm64
package version

@ -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 version

@ -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 version

@ -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 !android
// +build !android
package monitor

@ -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 && !freebsd && !windows && !darwin) || android
// +build !linux,!freebsd,!windows,!darwin android
package monitor

@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !freebsd,!windows,!darwin
//go:build !freebsd && !windows && !darwin
// +build !freebsd,!windows,!darwin
package monitor

@ -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 !windows && !linux && !darwin && !openbsd && !freebsd
// +build !windows,!linux,!darwin,!openbsd,!freebsd
package router

@ -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 || windows
// +build linux windows
package router

@ -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
// +build darwin freebsd
package router

@ -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 router

Loading…
Cancel
Save