From 990d25c97d8d6b244a1d76c4d13736bdbcfb2a98 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 31 Mar 2026 18:42:46 -0700 Subject: [PATCH] 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 --- go.toolchain.next.rev | 2 +- go.toolchain.rev | 2 +- go.toolchain.rev.sri | 2 +- version/version.go | 4 ++++ version/version_not_tsgo.go | 8 ++++++++ version/version_tsgo.go | 8 ++++++++ 6 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 version/version_not_tsgo.go create mode 100644 version/version_tsgo.go diff --git a/go.toolchain.next.rev b/go.toolchain.next.rev index 205355c47..858ec57df 100644 --- a/go.toolchain.next.rev +++ b/go.toolchain.next.rev @@ -1 +1 @@ -f4de14a515221e27c0d79446b423849a6546e3a6 +179b46cade24e44f53b53a3cbcc7b7eb78469c31 diff --git a/go.toolchain.rev b/go.toolchain.rev index 205355c47..858ec57df 100644 --- a/go.toolchain.rev +++ b/go.toolchain.rev @@ -1 +1 @@ -f4de14a515221e27c0d79446b423849a6546e3a6 +179b46cade24e44f53b53a3cbcc7b7eb78469c31 diff --git a/go.toolchain.rev.sri b/go.toolchain.rev.sri index 86b2083ff..4efbc9f7c 100644 --- a/go.toolchain.rev.sri +++ b/go.toolchain.rev.sri @@ -1 +1 @@ -sha256-qmX68/Ml/jvf+sD9qykdx9QhSbkYaF8xJMFtd3iLHI8= +sha256-VH+AgB1qjopwiB4w2SHrJm61O6yAl5ZaCGaDYnzb03o= diff --git a/version/version.go b/version/version.go index 1171ed2ff..7d8efc375 100644 --- a/version/version.go +++ b/version/version.go @@ -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 { diff --git a/version/version_not_tsgo.go b/version/version_not_tsgo.go new file mode 100644 index 000000000..a852964ab --- /dev/null +++ b/version/version_not_tsgo.go @@ -0,0 +1,8 @@ +// Copyright (c) Tailscale Inc & contributors +// SPDX-License-Identifier: BSD-3-Clause + +//go:build !tailscale_go + +package version + +const isTailscaleGo = false diff --git a/version/version_tsgo.go b/version/version_tsgo.go new file mode 100644 index 000000000..fd72af7d4 --- /dev/null +++ b/version/version_tsgo.go @@ -0,0 +1,8 @@ +// Copyright (c) Tailscale Inc & contributors +// SPDX-License-Identifier: BSD-3-Clause + +//go:build tailscale_go + +package version + +const isTailscaleGo = true