Get printer from factory instead of using NewHumanReadablePrinter to retrieve handled resources

This commit is contained in:
Janet Kuo
2015-09-02 15:38:40 -07:00
parent d6d6bd825d
commit 96031aaca5
4 changed files with 19 additions and 5 deletions

View File

@@ -65,6 +65,8 @@ $ kubectl label pods foo bar-`
func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command {
options := &LabelOptions{}
// retrieve a list of handled resources from printer as valid args
validArgs := []string{}
p, err := f.Printer(nil, false, false, false, false, []string{})
cmdutil.CheckErr(err)