mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 19:45:35 +00:00
7f8519c88f
See https://golang.org/doc/go1.16#darwin No need for build tag tricks anymore.
25 lines
587 B
Go
25 lines
587 B
Go
// 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.
|
|
|
|
package version
|
|
|
|
import "runtime"
|
|
|
|
// IsMobile reports whether this is a mobile client build.
|
|
func IsMobile() bool {
|
|
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 runtime.GOOS == "ios" {
|
|
return "iOS"
|
|
}
|
|
if runtime.GOOS == "darwin" {
|
|
return "macOS"
|
|
}
|
|
return runtime.GOOS
|
|
}
|