@ -24,7 +24,6 @@ import (
"github.com/peterbourgon/ff/v3/ffcli"
"github.com/peterbourgon/ff/v3/ffcli"
"tailscale.com/client/tailscale"
"tailscale.com/client/tailscale"
"tailscale.com/envknob"
"tailscale.com/ipn"
"tailscale.com/ipn"
"tailscale.com/ipn/ipnstate"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"tailscale.com/tailcfg"
@ -34,17 +33,14 @@ import (
var serveCmd = func ( ) * ffcli . Command {
var serveCmd = func ( ) * ffcli . Command {
se := & serveEnv { lc : & localClient }
se := & serveEnv { lc : & localClient }
// This flag is used to switch to an in-development
// previously used to serve legacy newFunnelCommand unless useWIPCode is true
// implementation of the tailscale funnel command.
// change is limited to make a revert easier and full cleanup to come after the relase.
// See https://github.com/tailscale/tailscale/issues/7844
// TODO(tylersmalley): cleanup and removal of newServeLegacyCommand as of 2023-10-16
if envknob . UseWIPCode ( ) {
return newServeV2Command ( se , serve )
return newServeDevCommand ( se , serve )
}
return newServeCommand ( se )
}
}
// newServe Command returns a new "serve" subcommand using e as its environment.
// newServeLegacyCommand returns a new "serve" subcommand using e as its environment.
func newServe Command( e * serveEnv ) * ffcli . Command {
func newServe Legacy Command( e * serveEnv ) * ffcli . Command {
return & ffcli . Command {
return & ffcli . Command {
Name : "serve" ,
Name : "serve" ,
ShortHelp : "Serve content and local servers" ,
ShortHelp : "Serve content and local servers" ,