mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +00:00
cmd/tailscale: hide share subcommand
Fixes #1115 Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:
parent
58b8f78e7e
commit
d0ef3a25df
@ -125,7 +125,6 @@ func Run(args []string) (err error) {
|
||||
versionCmd,
|
||||
webCmd,
|
||||
fileCmd,
|
||||
shareCmd,
|
||||
bugReportCmd,
|
||||
certCmd,
|
||||
netlockCmd,
|
||||
@ -148,6 +147,8 @@ func Run(args []string) (err error) {
|
||||
switch {
|
||||
case slices.Contains(args, "debug"):
|
||||
rootCmd.Subcommands = append(rootCmd.Subcommands, debugCmd)
|
||||
case slices.Contains(args, "share"):
|
||||
rootCmd.Subcommands = append(rootCmd.Subcommands, shareCmd)
|
||||
}
|
||||
if runtime.GOOS == "linux" && distro.Get() == distro.Synology {
|
||||
rootCmd.Subcommands = append(rootCmd.Subcommands, configureHostCmd)
|
||||
|
@ -15,9 +15,9 @@
|
||||
)
|
||||
|
||||
const (
|
||||
shareAddUsage = "[ALPHA] share add <name> <path>"
|
||||
shareRemoveUsage = "[ALPHA] share remove <name>"
|
||||
shareListUsage = "[ALPHA] share list"
|
||||
shareAddUsage = "share add <name> <path>"
|
||||
shareRemoveUsage = "share remove <name>"
|
||||
shareListUsage = "share list"
|
||||
)
|
||||
|
||||
var shareCmd = &ffcli.Command{
|
||||
@ -34,18 +34,18 @@
|
||||
{
|
||||
Name: "add",
|
||||
Exec: runShareAdd,
|
||||
ShortHelp: "add a share",
|
||||
ShortHelp: "[ALPHA] add a share",
|
||||
UsageFunc: usageFunc,
|
||||
},
|
||||
{
|
||||
Name: "remove",
|
||||
ShortHelp: "remove a share",
|
||||
ShortHelp: "[ALPHA] remove a share",
|
||||
Exec: runShareRemove,
|
||||
UsageFunc: usageFunc,
|
||||
},
|
||||
{
|
||||
Name: "list",
|
||||
ShortHelp: "list current shares",
|
||||
ShortHelp: "[ALPHA] list current shares",
|
||||
Exec: runShareList,
|
||||
UsageFunc: usageFunc,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user