From 24482b7dbebebaa71470566c3426ba77202c9970 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 18 Jan 2026 14:47:18 +0000 Subject: [PATCH] Run `go fix`, corrects mostly build tags --- cmd/yggdrasil/chuser_other.go | 1 - cmd/yggdrasil/chuser_unix.go | 1 - cmd/yggdrasil/chuser_unix_test.go | 1 - contrib/mobile/mobile_android.go | 1 - contrib/mobile/mobile_apple.go | 1 - contrib/mobile/mobile_mem_go120.go | 1 - contrib/mobile/mobile_mem_other.go | 1 - contrib/mobile/mobile_other.go | 1 - src/config/defaults_darwin.go | 1 - src/config/defaults_freebsd.go | 1 - src/config/defaults_linux.go | 1 - src/config/defaults_openbsd.go | 1 - src/config/defaults_other.go | 1 - src/config/defaults_windows.go | 1 - src/core/link_tcp_darwin.go | 1 - src/core/link_tcp_linux.go | 1 - src/core/link_tcp_other.go | 1 - src/multicast/multicast_darwin.go | 2 -- src/multicast/multicast_darwin_cgo.go | 1 - src/multicast/multicast_other.go | 1 - src/multicast/multicast_unix.go | 1 - src/multicast/multicast_windows.go | 1 - src/tun/tun_darwin.go | 1 - src/tun/tun_freebsd.go | 1 - src/tun/tun_linux.go | 1 - src/tun/tun_openbsd.go | 5 ++--- src/tun/tun_other.go | 1 - src/tun/tun_windows.go | 1 - 28 files changed, 2 insertions(+), 31 deletions(-) diff --git a/cmd/yggdrasil/chuser_other.go b/cmd/yggdrasil/chuser_other.go index 702f3715..9d331c3b 100644 --- a/cmd/yggdrasil/chuser_other.go +++ b/cmd/yggdrasil/chuser_other.go @@ -1,5 +1,4 @@ //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris -// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris package main diff --git a/cmd/yggdrasil/chuser_unix.go b/cmd/yggdrasil/chuser_unix.go index 24a706df..fdb290d2 100644 --- a/cmd/yggdrasil/chuser_unix.go +++ b/cmd/yggdrasil/chuser_unix.go @@ -1,5 +1,4 @@ //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package main diff --git a/cmd/yggdrasil/chuser_unix_test.go b/cmd/yggdrasil/chuser_unix_test.go index fc624ac2..5d9720f7 100644 --- a/cmd/yggdrasil/chuser_unix_test.go +++ b/cmd/yggdrasil/chuser_unix_test.go @@ -1,5 +1,4 @@ //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package main diff --git a/contrib/mobile/mobile_android.go b/contrib/mobile/mobile_android.go index 39bebec2..4281340d 100644 --- a/contrib/mobile/mobile_android.go +++ b/contrib/mobile/mobile_android.go @@ -1,5 +1,4 @@ //go:build android -// +build android package mobile diff --git a/contrib/mobile/mobile_apple.go b/contrib/mobile/mobile_apple.go index 2c53fa94..aaf83990 100644 --- a/contrib/mobile/mobile_apple.go +++ b/contrib/mobile/mobile_apple.go @@ -1,5 +1,4 @@ //go:build ios || darwin -// +build ios darwin package mobile diff --git a/contrib/mobile/mobile_mem_go120.go b/contrib/mobile/mobile_mem_go120.go index 853f1aba..71ae7811 100644 --- a/contrib/mobile/mobile_mem_go120.go +++ b/contrib/mobile/mobile_mem_go120.go @@ -1,5 +1,4 @@ //go:build go1.20 -// +build go1.20 package mobile diff --git a/contrib/mobile/mobile_mem_other.go b/contrib/mobile/mobile_mem_other.go index 729d9c2a..a4fa2b6b 100644 --- a/contrib/mobile/mobile_mem_other.go +++ b/contrib/mobile/mobile_mem_other.go @@ -1,5 +1,4 @@ //go:build !go1.20 -// +build !go1.20 package mobile diff --git a/contrib/mobile/mobile_other.go b/contrib/mobile/mobile_other.go index 10804b3e..62020c28 100644 --- a/contrib/mobile/mobile_other.go +++ b/contrib/mobile/mobile_other.go @@ -1,5 +1,4 @@ //go:build !android && !ios && !darwin -// +build !android,!ios,!darwin package mobile diff --git a/src/config/defaults_darwin.go b/src/config/defaults_darwin.go index 5f44ef59..51b1c024 100644 --- a/src/config/defaults_darwin.go +++ b/src/config/defaults_darwin.go @@ -1,5 +1,4 @@ //go:build darwin -// +build darwin package config diff --git a/src/config/defaults_freebsd.go b/src/config/defaults_freebsd.go index 97f7b4c3..98b51e5a 100644 --- a/src/config/defaults_freebsd.go +++ b/src/config/defaults_freebsd.go @@ -1,5 +1,4 @@ //go:build freebsd -// +build freebsd package config diff --git a/src/config/defaults_linux.go b/src/config/defaults_linux.go index 6f7cbfc3..5d432a91 100644 --- a/src/config/defaults_linux.go +++ b/src/config/defaults_linux.go @@ -1,5 +1,4 @@ //go:build linux -// +build linux package config diff --git a/src/config/defaults_openbsd.go b/src/config/defaults_openbsd.go index 81ddf7e8..338cab41 100644 --- a/src/config/defaults_openbsd.go +++ b/src/config/defaults_openbsd.go @@ -1,5 +1,4 @@ //go:build openbsd -// +build openbsd package config diff --git a/src/config/defaults_other.go b/src/config/defaults_other.go index 8299364c..136a0501 100644 --- a/src/config/defaults_other.go +++ b/src/config/defaults_other.go @@ -1,5 +1,4 @@ //go:build !linux && !darwin && !windows && !openbsd && !freebsd -// +build !linux,!darwin,!windows,!openbsd,!freebsd package config diff --git a/src/config/defaults_windows.go b/src/config/defaults_windows.go index 5b30b4fd..c9b7c175 100644 --- a/src/config/defaults_windows.go +++ b/src/config/defaults_windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package config diff --git a/src/core/link_tcp_darwin.go b/src/core/link_tcp_darwin.go index 4c19ba93..da2c11a7 100644 --- a/src/core/link_tcp_darwin.go +++ b/src/core/link_tcp_darwin.go @@ -1,5 +1,4 @@ //go:build darwin -// +build darwin package core diff --git a/src/core/link_tcp_linux.go b/src/core/link_tcp_linux.go index 6c54f30b..e7f05ddc 100644 --- a/src/core/link_tcp_linux.go +++ b/src/core/link_tcp_linux.go @@ -1,5 +1,4 @@ //go:build linux -// +build linux package core diff --git a/src/core/link_tcp_other.go b/src/core/link_tcp_other.go index f8a5aece..24c85584 100644 --- a/src/core/link_tcp_other.go +++ b/src/core/link_tcp_other.go @@ -1,5 +1,4 @@ //go:build !darwin && !linux -// +build !darwin,!linux package core diff --git a/src/multicast/multicast_darwin.go b/src/multicast/multicast_darwin.go index 22cf3998..39d11f37 100644 --- a/src/multicast/multicast_darwin.go +++ b/src/multicast/multicast_darwin.go @@ -1,6 +1,4 @@ //go:build !cgo && (darwin || ios) -// +build !cgo -// +build darwin ios package multicast diff --git a/src/multicast/multicast_darwin_cgo.go b/src/multicast/multicast_darwin_cgo.go index 16266381..dee1e389 100644 --- a/src/multicast/multicast_darwin_cgo.go +++ b/src/multicast/multicast_darwin_cgo.go @@ -1,5 +1,4 @@ //go:build (darwin && cgo) || (ios && cgo) -// +build darwin,cgo ios,cgo package multicast diff --git a/src/multicast/multicast_other.go b/src/multicast/multicast_other.go index 263f4ffc..d48a3b83 100644 --- a/src/multicast/multicast_other.go +++ b/src/multicast/multicast_other.go @@ -1,5 +1,4 @@ //go:build !linux && !darwin && !ios && !netbsd && !freebsd && !openbsd && !dragonflybsd && !windows -// +build !linux,!darwin,!ios,!netbsd,!freebsd,!openbsd,!dragonflybsd,!windows package multicast diff --git a/src/multicast/multicast_unix.go b/src/multicast/multicast_unix.go index 08230735..863da0c8 100644 --- a/src/multicast/multicast_unix.go +++ b/src/multicast/multicast_unix.go @@ -1,5 +1,4 @@ //go:build linux || netbsd || freebsd || openbsd || dragonflybsd -// +build linux netbsd freebsd openbsd dragonflybsd package multicast diff --git a/src/multicast/multicast_windows.go b/src/multicast/multicast_windows.go index fa194ac6..d704c61b 100644 --- a/src/multicast/multicast_windows.go +++ b/src/multicast/multicast_windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package multicast diff --git a/src/tun/tun_darwin.go b/src/tun/tun_darwin.go index deeb115e..14c94eb8 100644 --- a/src/tun/tun_darwin.go +++ b/src/tun/tun_darwin.go @@ -1,5 +1,4 @@ //go:build darwin || ios -// +build darwin ios package tun diff --git a/src/tun/tun_freebsd.go b/src/tun/tun_freebsd.go index 7b8ab50c..16127b53 100644 --- a/src/tun/tun_freebsd.go +++ b/src/tun/tun_freebsd.go @@ -1,5 +1,4 @@ //go:build freebsd -// +build freebsd package tun diff --git a/src/tun/tun_linux.go b/src/tun/tun_linux.go index 98d63db4..29f437ae 100644 --- a/src/tun/tun_linux.go +++ b/src/tun/tun_linux.go @@ -1,5 +1,4 @@ //go:build linux || android -// +build linux android package tun diff --git a/src/tun/tun_openbsd.go b/src/tun/tun_openbsd.go index 714db3a8..2f0710ea 100644 --- a/src/tun/tun_openbsd.go +++ b/src/tun/tun_openbsd.go @@ -1,5 +1,4 @@ //go:build openbsd -// +build openbsd package tun @@ -38,8 +37,8 @@ type sockaddr_in6 struct { sin6_scope_id uint32 } -func (sa6 *sockaddr_in6) setSockaddr(addr [/*16*/]byte /* net.IP or net.IPMask */) { - sa6.sin6_len = uint8(unsafe.Sizeof(*sa6)) +func (sa6 *sockaddr_in6) setSockaddr(addr [] /*16*/ byte /* net.IP or net.IPMask */) { + sa6.sin6_len = uint8(unsafe.Sizeof(*sa6)) sa6.sin6_family = unix.AF_INET6 for i := range sa6.sin6_addr { diff --git a/src/tun/tun_other.go b/src/tun/tun_other.go index 0ddd0c1e..9893f3c9 100644 --- a/src/tun/tun_other.go +++ b/src/tun/tun_other.go @@ -1,5 +1,4 @@ //go:build !linux && !darwin && !ios && !android && !windows && !openbsd && !freebsd && !mobile -// +build !linux,!darwin,!ios,!android,!windows,!openbsd,!freebsd,!mobile package tun diff --git a/src/tun/tun_windows.go b/src/tun/tun_windows.go index a2861894..f61d34b1 100644 --- a/src/tun/tun_windows.go +++ b/src/tun/tun_windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package tun