cmd/tailscale/cli: make serve and funnel visible in list (#7737)

This commit is contained in:
shayne
2023-04-03 10:09:04 -04:00
committed by GitHub
parent 1bf65e4760
commit 59879e5770
3 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -120,6 +120,8 @@ change in the future.
pingCmd, pingCmd,
ncCmd, ncCmd,
sshCmd, sshCmd,
funnelCmd,
serveCmd,
versionCmd, versionCmd,
webCmd, webCmd,
fileCmd, fileCmd,
@@ -147,10 +149,6 @@ change in the future.
switch { switch {
case slices.Contains(args, "debug"): case slices.Contains(args, "debug"):
rootCmd.Subcommands = append(rootCmd.Subcommands, debugCmd) rootCmd.Subcommands = append(rootCmd.Subcommands, debugCmd)
case slices.Contains(args, "funnel"):
rootCmd.Subcommands = append(rootCmd.Subcommands, funnelCmd)
case slices.Contains(args, "serve"):
rootCmd.Subcommands = append(rootCmd.Subcommands, serveCmd)
case slices.Contains(args, "update"): case slices.Contains(args, "update"):
rootCmd.Subcommands = append(rootCmd.Subcommands, updateCmd) rootCmd.Subcommands = append(rootCmd.Subcommands, updateCmd)
} }
+1 -1
View File
@@ -29,7 +29,7 @@ var funnelCmd = newFunnelCommand(&serveEnv{lc: &localClient})
func newFunnelCommand(e *serveEnv) *ffcli.Command { func newFunnelCommand(e *serveEnv) *ffcli.Command {
return &ffcli.Command{ return &ffcli.Command{
Name: "funnel", Name: "funnel",
ShortHelp: "[BETA] turn Tailscale Funnel on or off", ShortHelp: "Turn on/off Funnel service",
ShortUsage: strings.TrimSpace(` ShortUsage: strings.TrimSpace(`
funnel <serve-port> {on|off} funnel <serve-port> {on|off}
funnel status [--json] funnel status [--json]
+1 -1
View File
@@ -33,7 +33,7 @@ var serveCmd = newServeCommand(&serveEnv{lc: &localClient})
func newServeCommand(e *serveEnv) *ffcli.Command { func newServeCommand(e *serveEnv) *ffcli.Command {
return &ffcli.Command{ return &ffcli.Command{
Name: "serve", Name: "serve",
ShortHelp: "[BETA] Serve from your Tailscale node", ShortHelp: "Serve content and local servers",
ShortUsage: strings.TrimSpace(` ShortUsage: strings.TrimSpace(`
serve https:<port> <mount-point> <source> [off] serve https:<port> <mount-point> <source> [off]
serve tcp:<port> tcp://localhost:<local-port> [off] serve tcp:<port> tcp://localhost:<local-port> [off]