Merge pull request #54867 from juanvallejo/jvallejo/move-print-success-cmdutil-factory

Automatic merge from submit-queue (batch tested with PRs 55233, 55927, 55903, 54867, 55940). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

move cmd/util/printing.go#PrintSuccess to factory_builder.go

**Release note**:
```release-note
NONE
```

This patch is one in a series of patches that aims to move all
printing functions to the `cmdutil.Factory` in order to make
the factory the one-stop shop for accessing printers in the client.

This PR is related to https://github.com/kubernetes/kubernetes/pull/50113 and aims to break that set of changes
by introducing a portion of them in this commit in order to make 
them easier to review.

@fabianofranz @mengqiy @shiywang @seans3
This commit is contained in:
Kubernetes Submit Queue
2017-11-18 12:26:15 -08:00
committed by GitHub
34 changed files with 151 additions and 88 deletions

View File

@@ -314,7 +314,7 @@ func (o *LabelOptions) RunLabel(f cmdutil.Factory, cmd *cobra.Command) error {
if o.outputFormat != "" {
return f.PrintObject(cmd, o.local, mapper, outputObj, o.out)
}
cmdutil.PrintSuccess(mapper, false, o.out, info.Mapping.Resource, info.Name, o.dryrun, dataChangeMsg)
f.PrintSuccess(mapper, false, o.out, info.Mapping.Resource, info.Name, o.dryrun, dataChangeMsg)
return nil
})
}