update vendor

Signed-off-by: Roland.Ma <rolandma@yunify.com>
This commit is contained in:
Roland.Ma
2021-08-11 07:10:14 +00:00
parent a18f72b565
commit ea8f47c73a
2901 changed files with 269317 additions and 43103 deletions

View File

@@ -33,6 +33,7 @@ type KubeTemplatePrintFlags struct {
TemplateArgument *string
}
// AllowedFormats returns slice of string of allowed GoTemplete and JSONPathPrint printing formats
func (f *KubeTemplatePrintFlags) AllowedFormats() []string {
if f == nil {
return []string{}
@@ -40,6 +41,10 @@ func (f *KubeTemplatePrintFlags) AllowedFormats() []string {
return append(f.GoTemplatePrintFlags.AllowedFormats(), f.JSONPathPrintFlags.AllowedFormats()...)
}
// ToPrinter receives an outputFormat and returns a printer capable of
// handling --template printing.
// Returns false if the specified outputFormat does not match a supported format.
// Supported Format types can be found in pkg/printers/printers.go
func (f *KubeTemplatePrintFlags) ToPrinter(outputFormat string) (printers.ResourcePrinter, error) {
if f == nil {
return nil, NoCompatiblePrinterError{}