- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for getRootCmd (0.14 sec)
-
istioctl/cmd/istioctl_test.go
// unknown flags should be a command parse rootCmd := GetRootCmd([]string{"--unknown-flag"}) fErr := rootCmd.Execute() switch fErr.(type) { case istioctlutil.CommandParseError: // do nothing default: t.Errorf("Expected a CommandParseError, but got %q.", fErr) } // we should propagate to subcommands rootCmd = GetRootCmd([]string{"analyze", "--unknown-flag"}) fErr = rootCmd.Execute()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 29 14:53:25 UTC 2023 - 1.5K bytes - Viewed (0) -
operator/cmd/operator/root.go
// limitations under the License. package main import ( "flag" "github.com/spf13/cobra" "istio.io/istio/pkg/collateral" "istio.io/istio/pkg/version" ) // getRootCmd returns the root of the cobra command-tree. func getRootCmd(args []string) *cobra.Command { rootCmd := &cobra.Command{ Use: "operator", Short: "The Istio operator.", Args: cobra.ExactArgs(0),
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jan 10 03:51:36 UTC 2024 - 1.3K bytes - Viewed (0) -
istioctl/cmd/istioctl/main.go
) func main() { if err := cmd.ConfigAndEnvProcessing(); err != nil { fmt.Fprintf(os.Stderr, "Could not initialize: %v\n", err) exitCode := cmd.GetExitCode(err) os.Exit(exitCode) } rootCmd := cmd.GetRootCmd(os.Args[1:]) log.EnableKlogWithCobra() if err := rootCmd.Execute(); err != nil { exitCode := cmd.GetExitCode(err) os.Exit(exitCode) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 1.1K bytes - Viewed (0) -
operator/cmd/operator/main.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Mar 02 03:03:35 UTC 2024 - 785 bytes - Viewed (0) -
operator/cmd/mesh/root.go
} func addFlags(cmd *cobra.Command, rootArgs *RootArgs) { cmd.PersistentFlags().BoolVarP(&rootArgs.DryRun, "dry-run", "", false, "Console/log output only, make no changes.") } // GetRootCmd returns the root of the cobra command-tree. func GetRootCmd(ctx cli.Context, args []string) *cobra.Command { rootCmd := &cobra.Command{ Use: "mesh", Short: "Command line Istio install utility.", SilenceUsage: true,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Mar 15 01:18:49 UTC 2024 - 3.9K bytes - Viewed (0) -
operator/cmd/mesh/profile-list_test.go
g := NewWithT(t) args := []string{"profile", "list", "--dry-run", "--manifests", filepath.Join(env.IstioSrc, "manifests")} kubeClientFunc = func() (kube.CLIClient, error) { return nil, nil } rootCmd := GetRootCmd(cli.NewFakeContext(&cli.NewFakeContextOption{ Version: "25", }), args) var out bytes.Buffer rootCmd.SetOut(&out) rootCmd.SetErr(&out) err := rootCmd.Execute() if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 03 06:27:07 UTC 2024 - 1.5K bytes - Viewed (0) -
operator/cmd/mesh.go
"istio.io/istio/operator/cmd/mesh" binversion "istio.io/istio/operator/version" "istio.io/istio/pkg/version" ) func main() { version.Info.Version = binversion.OperatorVersionString rootCmd := mesh.GetRootCmd(cli.NewCLIContext(nil), os.Args[1:]) if err := rootCmd.Execute(); err != nil { os.Exit(1) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 29 14:15:33 UTC 2023 - 963 bytes - Viewed (0) -
istioctl/cmd/options_test.go
--log_target: The set of paths where to output the log. This can be any path as well as the special values stdout and stderr ` func TestLogHelp(t *testing.T) { var out bytes.Buffer rootCmd := GetRootCmd([]string{"options"}) rootCmd.SetOut(&out) rootCmd.SetErr(&out) fErr := rootCmd.Execute() if fErr != nil { t.Fatalf("options failed with %v and %q\n", fErr, out.String()) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Sep 14 02:38:54 UTC 2022 - 1.9K bytes - Viewed (0) -
pkg/test/framework/components/istioctl/kube.go
cmdArgs := append([]string{ "--kubeconfig", c.kubeconfig, }, args...) var out bytes.Buffer var err bytes.Buffer start := time.Now() invokeMutex.Lock() rootCmd := cmd.GetRootCmd(cmdArgs) rootCmd.SetOut(&out) rootCmd.SetErr(&err) // istioctl will overwrite logs which we don't want. // It happens to do this via PersistentPreRunE, which we can disable.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Mar 29 02:29:02 UTC 2024 - 3.7K bytes - Viewed (0) -
operator/cmd/mesh/operator_test.go
if test.watchedNamespaces != "" { args = append(args, "--watchedNamespaces", test.watchedNamespaces) } kubeClientFunc = func() (kube.CLIClient, error) { return nil, nil } rootCmd := GetRootCmd(cli.NewFakeContext(&cli.NewFakeContextOption{ Version: "25", }), args) err := rootCmd.Execute() assert.NoError(t, err) readActions := map[string]bool{ "get": true,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 29 14:15:33 UTC 2023 - 6.4K bytes - Viewed (0)