From d1dd04e3270e4747149f58f7026a1a22768f1a32 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Fri, 26 Aug 2022 11:18:36 -0700 Subject: [PATCH] cmd/tailscale: use platform specific license link --- cmd/tailscale/cli/licenses.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cmd/tailscale/cli/licenses.go b/cmd/tailscale/cli/licenses.go index 2c746d2c0..16b07d37d 100644 --- a/cmd/tailscale/cli/licenses.go +++ b/cmd/tailscale/cli/licenses.go @@ -6,6 +6,7 @@ package cli import ( "context" + "runtime" "github.com/peterbourgon/ff/v3/ffcli" ) @@ -19,11 +20,23 @@ var licensesCmd = &ffcli.Command{ } func runLicenses(ctx context.Context, args []string) error { + var licenseURL string + switch runtime.GOOS { + case "android": + licenseURL = "https://tailscale.com/licenses/android" + case "darwin", "ios": + licenseURL = "https://tailscale.com/licenses/apple" + case "windows": + licenseURL = "https://tailscale.com/licenses/windows" + default: + licenseURL = "https://tailscale.com/licenses/tailscale" + } + outln(` Tailscale wouldn't be possible without the contributions of thousands of open source developers. To see the open source packages included in Tailscale and their respective license information, visit: - https://tailscale.com/licenses/tailscale`) + ` + licenseURL) return nil }