cmd/tailscale{,d}: move debug subcommand to tailscaled

Work on reducing the size of the tailscale binary, which is
currently pulling in most of the same code as tailscaled.

Updates #1181
This commit is contained in:
Brad Fitzpatrick
2021-02-04 12:20:07 -08:00
parent 70eb05fd47
commit 6254efb9ef
5 changed files with 25 additions and 36 deletions

View File

@@ -68,11 +68,6 @@ change in the future.
Exec: func(context.Context, []string) error { return flag.ErrHelp },
}
// Don't advertise the debug command, but it exists.
if strSliceContains(args, "debug") {
rootCmd.Subcommands = append(rootCmd.Subcommands, debugCmd)
}
if err := rootCmd.Parse(args); err != nil {
return err
}
@@ -134,12 +129,3 @@ func pump(ctx context.Context, bc *ipn.BackendClient, conn net.Conn) {
bc.GotNotifyMsg(msg)
}
}
func strSliceContains(ss []string, s string) bool {
for _, v := range ss {
if v == s {
return true
}
}
return false
}