mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-28 19:50:59 +00:00

Also capitalises the start of all ShortHelp, allows subcommands to be hidden with a "HIDDEN: " prefix in their ShortHelp, and adds a TS_DUMP_HELP envknob to look at all --help messages together. Fixes #11664 Signed-off-by: Paul Scott <paul@tailscale.com>
31 lines
741 B
Go
31 lines
741 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package cli
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/peterbourgon/ff/v3/ffcli"
|
|
"tailscale.com/licenses"
|
|
)
|
|
|
|
var licensesCmd = &ffcli.Command{
|
|
Name: "licenses",
|
|
ShortUsage: "tailscale licenses",
|
|
ShortHelp: "Get open source license information",
|
|
LongHelp: "Get open source license information",
|
|
Exec: runLicenses,
|
|
}
|
|
|
|
func runLicenses(ctx context.Context, args []string) error {
|
|
url := licenses.LicensesURL()
|
|
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:
|
|
|
|
` + url)
|
|
return nil
|
|
}
|