From 6da6d47a8311e63e5234c54d5179bd35d285b57a Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 17 Aug 2021 10:25:32 -0700 Subject: [PATCH] all: simplify build tags involving iOS Prior to Go 1.16, iOS used GOOS=darwin, so we had to distinguish macOS from iOS during GOARCH. We now require Go 1.16 in our go.mod, so we can simplify. Signed-off-by: Josh Bleecher Snyder --- portlist/netstat.go | 4 ++-- portlist/netstat_exec.go | 4 ++-- portlist/portlist_ios.go | 4 ++-- portlist/portlist_macos.go | 5 ++--- version/cmdname.go | 4 ++-- version/cmdname_ios.go | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/portlist/netstat.go b/portlist/netstat.go index 77f14ddcd..c88641746 100644 --- a/portlist/netstat.go +++ b/portlist/netstat.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. -//go:build (go1.16 && !ios) || (!go1.16 && !darwin) || (!go1.16 && !arm64) -// +build go1.16,!ios !go1.16,!darwin !go1.16,!arm64 +//go:build !ios +// +build !ios package portlist diff --git a/portlist/netstat_exec.go b/portlist/netstat_exec.go index d4114a8e6..77972d980 100644 --- a/portlist/netstat_exec.go +++ b/portlist/netstat_exec.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. -//go:build (windows || freebsd || openbsd || (darwin && go1.16) || (darwin && !go1.16 && !arm64)) && !ios -// +build windows freebsd openbsd darwin,go1.16 darwin,!go1.16,!arm64 +//go:build (windows || freebsd || openbsd || darwin) && !ios +// +build windows freebsd openbsd darwin // +build !ios package portlist diff --git a/portlist/portlist_ios.go b/portlist/portlist_ios.go index a5a5253a9..a4a85f8b5 100644 --- a/portlist/portlist_ios.go +++ b/portlist/portlist_ios.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. -//go:build (go1.16 && ios) || (!go1.16 && darwin && !amd64) -// +build go1.16,ios !go1.16,darwin,!amd64 +//go:build ios +// +build ios package portlist diff --git a/portlist/portlist_macos.go b/portlist/portlist_macos.go index a99089db1..24aaaf6bb 100644 --- a/portlist/portlist_macos.go +++ b/portlist/portlist_macos.go @@ -2,9 +2,8 @@ // 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 +//go:build darwin +// +build darwin package portlist diff --git a/version/cmdname.go b/version/cmdname.go index 791551d2e..a0ae1a7f4 100644 --- a/version/cmdname.go +++ b/version/cmdname.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. -//go:build (go1.16 && !ios) || (!go1.16 && !darwin) || (!go1.16 && !arm64) -// +build go1.16,!ios !go1.16,!darwin !go1.16,!arm64 +//go:build !ios +// +build !ios package version diff --git a/version/cmdname_ios.go b/version/cmdname_ios.go index 3f5fda519..9c1aaa5e4 100644 --- a/version/cmdname_ios.go +++ b/version/cmdname_ios.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. -//go:build (go1.16 && ios) || (!go1.16 && darwin && arm64) -// +build go1.16,ios !go1.16,darwin,arm64 +//go:build ios +// +build ios package version