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.
This commit is contained in:
+2
-4
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user