func newExperimentalCommand(name, fullName string) *cobra.Command { out := os.Stdout experimental := &cobra.Command{ Use: name, Short: "Experimental commands under active development", Long: "The commands grouped here are under development and may change without notice.", Run: func(c *cobra.Command, args []string) { c.SetOutput(out) c.Help() }, BashCompletionFunction: admin.BashCompletionFunc, } f := clientcmd.New(experimental.PersistentFlags()) experimental.AddCommand(validate.NewCommandValidate(validate.ValidateRecommendedName, fullName+" "+validate.ValidateRecommendedName, out)) experimental.AddCommand(tokens.NewCmdTokens(tokens.TokenRecommendedCommandName, fullName+" "+tokens.TokenRecommendedCommandName, f, out)) experimental.AddCommand(exipfailover.NewCmdIPFailoverConfig(f, fullName, "ipfailover", out)) experimental.AddCommand(buildchain.NewCmdBuildChain(name, fullName+" "+buildchain.BuildChainRecommendedCommandName, f, out)) experimental.AddCommand(diagnostics.NewCommandDiagnostics("diagnostics", fullName+" diagnostics", out)) experimental.AddCommand(cmd.NewCmdOptions(out)) // these groups also live under `oadm groups {sync,prune}` and are here only for backwards compatibility experimental.AddCommand(sync.NewCmdSync("sync-groups", fullName+" "+"sync-groups", f, out)) experimental.AddCommand(sync.NewCmdPrune("prune-groups", fullName+" "+"prune-groups", f, out)) return experimental }
func newExperimentalCommand(name, fullName string) *cobra.Command { out := os.Stdout experimental := &cobra.Command{ Use: name, Short: "Experimental commands under active development", Long: "The commands grouped here are under development and may change without notice.", Run: func(c *cobra.Command, args []string) { c.SetOutput(out) c.Help() }, } f := clientcmd.New(experimental.PersistentFlags()) experimental.AddCommand(tokens.NewCmdTokens(tokens.TokenRecommendedCommandName, fullName+" "+tokens.TokenRecommendedCommandName, f, out)) experimental.AddCommand(exipfailover.NewCmdIPFailoverConfig(f, fullName, "ipfailover", out)) experimental.AddCommand(buildchain.NewCmdBuildChain(name, fullName+" "+buildchain.BuildChainRecommendedCommandName, f, out)) experimental.AddCommand(cmd.NewCmdOptions(out)) return experimental }