From 7f8519c88f446fb39157739faa0f0d8908f19359 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 19 Apr 2021 21:59:55 -0700 Subject: [PATCH] version: simplify iOS detection now that we require Go 1.16 See https://golang.org/doc/go1.16#darwin No need for build tag tricks anymore. --- version/prop.go | 6 ++---- version/prop_ios.go | 9 --------- version/prop_notios.go | 9 --------- 3 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 version/prop_ios.go delete mode 100644 version/prop_notios.go diff --git a/version/prop.go b/version/prop.go index 302209c09..b4565d247 100644 --- a/version/prop.go +++ b/version/prop.go @@ -8,15 +8,13 @@ import "runtime" // IsMobile reports whether this is a mobile client build. func IsMobile() bool { - // Good enough heuristic for now, at least until Apple makes - // ARM laptops... - return runtime.GOOS == "android" || isIOS + return runtime.GOOS == "android" || runtime.GOOS == "ios" } // OS returns runtime.GOOS, except instead of returning "darwin" it // returns "iOS" or "macOS". func OS() string { - if isIOS { + if runtime.GOOS == "ios" { return "iOS" } if runtime.GOOS == "darwin" { diff --git a/version/prop_ios.go b/version/prop_ios.go deleted file mode 100644 index a6fb9ea75..000000000 --- a/version/prop_ios.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020 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. - -// +build ios - -package version - -const isIOS = true diff --git a/version/prop_notios.go b/version/prop_notios.go deleted file mode 100644 index f2a5c0152..000000000 --- a/version/prop_notios.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020 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. - -// +build !ios - -package version - -const isIOS = false