go.toolchain.rev, version: bump Tailscale Go, add IsTailscaleGo
Reports whether the current binary was built with Tailscale's custom Go toolchain (the "tailscale_go" build tag). For https://github.com/tailscale/go/pull/165 Updates tailscale/corp#39430 Change-Id: Ica437582ddf55d7df48b1453bad03ce14b1c0949 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
88e7330ff1
commit
990d25c97d
@@ -172,6 +172,10 @@ func majorMinorPatch() string {
|
||||
return ret
|
||||
}
|
||||
|
||||
// IsTailscaleGo reports whether the current binary was built with
|
||||
// Tailscale's custom Go toolchain.
|
||||
func IsTailscaleGo() bool { return isTailscaleGo }
|
||||
|
||||
func isValidLongWithTwoRepos(v string) bool {
|
||||
s := strings.Split(v, "-")
|
||||
if len(s) != 3 {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !tailscale_go
|
||||
|
||||
package version
|
||||
|
||||
const isTailscaleGo = false
|
||||
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build tailscale_go
|
||||
|
||||
package version
|
||||
|
||||
const isTailscaleGo = true
|
||||
Reference in New Issue
Block a user