• Cao Shufeng's avatar
    fix kubectl -o · 995c5a07
    Cao Shufeng authored
    Fix kubectl -o error message:
    Before this change:
    ```shell
    kubectl get pods -o foo
    error: unable to match a printer suitable for the output format "" and the options specified: &get.PrintFlags{JSONYamlPrintFlags:(*genericclioptions.JSONYamlPrintFlags)(0x23aa610), NamePrintFlags:(*genericclioptions.NamePrintFlags)(0xc42058b4e0), TemplateFlags:(*printers.KubeTemplatePrintFlags)(0xc4206765e0), CustomColumnsFlags:(*printers.CustomColumnsPrintFlags)(0xc420676620), HumanReadableFlags:(*get.HumanPrintFlags)(0xc4204eb180), NoHeaders:(*bool)(0xc4206fefbc), OutputFormat:(*string)(0xc42058b4d0)}
    ```
    
    After this change:
    ```shell
    Kubectl get pods -o foo
    error: unable to match a printer suitable for the output format "aaa", allowed formats are: custom-columns,custom-columns-file,go-template,go-template-file,json,jsonpath,jsonpath-file,name,template,templatefile,wide,yaml
    ```
    995c5a07
Name
Last commit
Last update
..
internalversion Loading commit data...
storage Loading commit data...
.import-restrictions Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
customcolumn.go Loading commit data...
customcolumn_flags.go Loading commit data...
customcolumn_flags_test.go Loading commit data...
customcolumn_test.go Loading commit data...
humanreadable.go Loading commit data...
humanreadable_test.go Loading commit data...
interface.go Loading commit data...
jsonpath.go Loading commit data...
jsonpath_flags.go Loading commit data...
jsonpath_flags_test.go Loading commit data...
kube_template_flags.go Loading commit data...
tabwriter.go Loading commit data...
template.go Loading commit data...
template_flags.go Loading commit data...
template_flags_test.go Loading commit data...
template_test.go Loading commit data...