mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Small improvement of showKind get
This commit is contained in:
parent
8f4f07fcc1
commit
93b11ad12d
@ -301,11 +301,7 @@ func (options *GetOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []str
|
|||||||
|
|
||||||
useOpenAPIPrintColumns := cmdutil.GetFlagBool(cmd, useOpenAPIPrintColumnFlagLabel)
|
useOpenAPIPrintColumns := cmdutil.GetFlagBool(cmd, useOpenAPIPrintColumnFlagLabel)
|
||||||
|
|
||||||
showKind := options.ShowKind
|
showKind := options.ShowKind || resource.MultipleTypesRequested(args) || cmdutil.MustPrintWithKinds(objs, infos, sorter)
|
||||||
// TODO: abstract more cleanly
|
|
||||||
if resource.MultipleTypesRequested(args) || cmdutil.MustPrintWithKinds(objs, infos, sorter) {
|
|
||||||
showKind = true
|
|
||||||
}
|
|
||||||
|
|
||||||
filteredResourceCount := 0
|
filteredResourceCount := 0
|
||||||
noHeaders := cmdutil.GetFlagBool(cmd, "no-headers")
|
noHeaders := cmdutil.GetFlagBool(cmd, "no-headers")
|
||||||
|
Loading…
Reference in New Issue
Block a user