- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for WithDefaultOutput (0.17 sec)
-
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/print_flags_test.go
"metadata": map[string]interface{}{ "name": "bar", }, }, }, }, }, "pod/bar\n"}, } printFlags := NewPrintFlags("").WithTypeSetter(scheme.Scheme).WithDefaultOutput("name") printer, err := printFlags.ToPrinter() if err != nil { t.Fatalf("unexpected err: %v", err) } for name, item := range tests { buff := &bytes.Buffer{} err := printer.PrintObj(item.obj, buff)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 31 23:04:01 UTC 2019 - 2K bytes - Viewed (0) -
cmd/kubeadm/app/util/output/output.go
_ = cmd.Flags().MarkDeprecated("experimental-output", "please use --output instead.") } // WithDefaultOutput sets a default output format if one is not provided through a flag value func (pf *PrintFlags) WithDefaultOutput(outputFormat string) *PrintFlags { pf.OutputFormat = &outputFormat return pf }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 19 08:22:45 UTC 2024 - 8K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/print_flags.go
if f.OutputFlagSpecified == nil { f.OutputFlagSpecified = func() bool { return cmd.Flag("output").Changed } } } } // WithDefaultOutput sets a default output format if one is not provided through a flag value func (f *PrintFlags) WithDefaultOutput(output string) *PrintFlags { f.OutputFormat = &output return f }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 04 00:16:47 UTC 2022 - 5.6K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/config_test.go
kubernetesVersion: %s`, kubeadmapiv1.SchemeGroupVersion.String(), constants.MinimumControlPlaneVersion))), }, } outputFlags := output.NewOutputFlags(&imageTextPrintFlags{}).WithTypeSetter(outputapischeme.Scheme).WithDefaultOutput(output.TextOutput) printer, err := outputFlags.ToPrinter() if err != nil { t.Fatalf("can't create printer for the output format %s: %+v", output.TextOutput, err) } for _, tc := range testcases {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 06:58:01 UTC 2024 - 13K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/upgrade/plan_test.go
} for _, rt := range tests { t.Run(rt.name, func(t *testing.T) { rt.buf = bytes.NewBufferString("") outputFlags := output.NewOutputFlags(&upgradePlanTextPrintFlags{}).WithTypeSetter(outputapischeme.Scheme).WithDefaultOutput(output.TextOutput) printer, err := outputFlags.ToPrinter() if err != nil { t.Errorf("failed ToPrinter, err: %+v", err) } plan := genUpgradePlan(rt.upgrades, rt.versionStates)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Mar 03 03:03:29 UTC 2024 - 27.3K bytes - Viewed (0) -
pkg/kubectl/cmd/convert/convert.go
} func NewConvertOptions(ioStreams genericiooptions.IOStreams) *ConvertOptions { return &ConvertOptions{ PrintFlags: genericclioptions.NewPrintFlags("converted").WithTypeSetter(scheme.Scheme).WithDefaultOutput("yaml"), local: true, IOStreams: ioStreams, } } // NewCmdConvert creates a command object for the generic "convert" action, which // translates the config file into a given version.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 03:21:17 UTC 2023 - 9.6K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/token_test.go
Usages: tc.usages, Groups: tc.extraGroups, }, } buf := bytes.Buffer{} outputFlags := output.NewOutputFlags(&tokenTextPrintFlags{}).WithTypeSetter(outputapischeme.Scheme).WithDefaultOutput(tc.outputFormat) printer, err := outputFlags.ToPrinter() if err != nil { t.Errorf("can't create printer for output format %s: %+v", tc.outputFormat, err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 23 05:47:48 UTC 2024 - 13.6K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/upgrade/plan.go
func newCmdPlan(apf *applyPlanFlags) *cobra.Command { flags := &planFlags{ applyPlanFlags: apf, } outputFlags := output.NewOutputFlags(&upgradePlanTextPrintFlags{}).WithTypeSetter(outputapischeme.Scheme).WithDefaultOutput(output.TextOutput) cmd := &cobra.Command{ Use: "plan [version] [flags]", Short: "Check which versions are available to upgrade to and validate whether your current cluster is upgradeable.",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Mar 03 03:03:29 UTC 2024 - 14.9K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/token.go
tokenCmd.AddCommand(createCmd) tokenCmd.AddCommand(newCmdTokenGenerate(out)) outputFlags := output.NewOutputFlags(&tokenTextPrintFlags{}).WithTypeSetter(outputapischeme.Scheme).WithDefaultOutput(output.TextOutput) listCmd := &cobra.Command{ Use: "list", Short: "List bootstrap tokens on the server", Long: dedent.Dedent(` This command will list all bootstrap tokens for you. `),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 23 05:47:48 UTC 2024 - 15.9K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/config.go
if mockK8sVersion != nil { externalcfg.KubernetesVersion = *mockK8sVersion } outputFlags := output.NewOutputFlags(&imageTextPrintFlags{}).WithTypeSetter(outputapischeme.Scheme).WithDefaultOutput(output.TextOutput) cmd := &cobra.Command{ Use: "list", Short: "Print a list of images kubeadm will use. The configuration file is used in case any images or image repositories are customized",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 06:58:01 UTC 2024 - 18.9K bytes - Viewed (0)