mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Switch kubectl resource completion to discovery
This commit is contained in:
@@ -239,15 +239,3 @@ func maybeWrapSortingPrinter(printer printers.ResourcePrinter, printOpts printer
|
||||
func SuggestApiResources(parent string) string {
|
||||
return templates.LongDesc(fmt.Sprintf("Use \"%s api-resources\" for a complete list of supported resources.", parent))
|
||||
}
|
||||
|
||||
// Retrieve a list of handled resources from printer as valid args
|
||||
// TODO: This function implementation should be replaced with a real implementation from the discovery service.
|
||||
func ValidArgList(f ClientAccessFactory) []string {
|
||||
validArgs := []string{}
|
||||
|
||||
humanReadablePrinter := printers.NewHumanReadablePrinter(nil, printers.PrintOptions{})
|
||||
printersinternal.AddHandlers(humanReadablePrinter)
|
||||
validArgs = humanReadablePrinter.HandledResources()
|
||||
|
||||
return validArgs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user