Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for IsNoCompatiblePrinterError (0.43 sec)

  1. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/print_flags.go

    	return fmt.Sprintf("unable to match a printer suitable for the output format %q, allowed formats are: %s", output, strings.Join(e.AllowedFormats, ","))
    }
    
    // IsNoCompatiblePrinterError returns true if it is a not a compatible printer
    // otherwise it will return false
    func IsNoCompatiblePrinterError(err error) bool {
    	if err == nil {
    		return false
    	}
    
    	_, ok := err.(NoCompatiblePrinterError)
    	return ok
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 04 00:16:47 UTC 2022
    - 5.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/json_yaml_flags_test.go

    			printFlags := JSONYamlPrintFlags{}
    
    			p, err := printFlags.ToPrinter(tc.outputFormat)
    			if tc.expectNoMatch {
    				if !IsNoCompatiblePrinterError(err) {
    					t.Fatalf("expected no printer matches for output format %q", tc.outputFormat)
    				}
    				return
    			}
    			if IsNoCompatiblePrinterError(err) {
    				t.Fatalf("expected to match template printer for output format %q", tc.outputFormat)
    			}
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 21 15:08:30 UTC 2018
    - 2.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/template_flags_test.go

    			}
    
    			p, err := printFlags.ToPrinter(tc.outputFormat)
    			if tc.expectNoMatch {
    				if !IsNoCompatiblePrinterError(err) {
    					t.Fatalf("expected no printer matches for output format %q", tc.outputFormat)
    				}
    				return
    			}
    			if IsNoCompatiblePrinterError(err) {
    				t.Fatalf("expected to match template printer for output format %q", tc.outputFormat)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 09:47:52 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/name_flags_test.go

    				Operation: tc.operation,
    			}
    
    			p, err := printFlags.ToPrinter(tc.outputFormat)
    			if tc.expectNoMatch {
    				if !IsNoCompatiblePrinterError(err) {
    					t.Fatalf("expected no printer matches for output format %q", tc.outputFormat)
    				}
    				return
    			}
    			if IsNoCompatiblePrinterError(err) {
    				t.Fatalf("expected to match name printer for output format %q", tc.outputFormat)
    			}
    
    			if len(tc.expectedError) > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 21 15:08:30 UTC 2018
    - 3.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags_test.go

    			}
    
    			p, err := printFlags.ToPrinter(tc.outputFormat)
    			if tc.expectNoMatch {
    				if !IsNoCompatiblePrinterError(err) {
    					t.Fatalf("expected no printer matches for output format %q", tc.outputFormat)
    				}
    				return
    			}
    			if IsNoCompatiblePrinterError(err) {
    				t.Fatalf("expected to match template printer for output format %q", tc.outputFormat)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 09:47:52 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/output/output.go

    	}
    
    	if pf.TextPrintFlags != nil {
    		if p, err := pf.TextPrintFlags.ToPrinter(outputFormat); !genericclioptions.IsNoCompatiblePrinterError(err) {
    			return p, err
    		}
    	}
    
    	if pf.JSONYamlPrintFlags != nil {
    		if p, err := pf.JSONYamlPrintFlags.ToPrinter(outputFormat); !genericclioptions.IsNoCompatiblePrinterError(err) {
    			return NewResourcePrinterWrapper(pf.TypeSetterPrinter.WrapToPrinter(p, err))
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 08:22:45 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/kube_template_flags.go

    func (f *KubeTemplatePrintFlags) ToPrinter(outputFormat string) (printers.ResourcePrinter, error) {
    	if f == nil {
    		return nil, NoCompatiblePrinterError{}
    	}
    
    	if p, err := f.JSONPathPrintFlags.ToPrinter(outputFormat); !IsNoCompatiblePrinterError(err) {
    		return p, err
    	}
    	return f.GoTemplatePrintFlags.ToPrinter(outputFormat)
    }
    
    // AddFlags receives a *cobra.Command reference and binds
    // flags related to template printing to it
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 13 10:28:09 UTC 2021
    - 3.3K bytes
    - Viewed (0)
Back to top