remove mapper dependency - PrintSuccess

This commit is contained in:
juanvallejo
2018-02-01 18:59:11 -05:00
parent 06472a054a
commit beb5ea641a
67 changed files with 156 additions and 169 deletions

View File

@@ -376,8 +376,7 @@ func (f *FakeFactory) PrintResourceInfoForCommand(cmd *cobra.Command, info *reso
return printer.PrintObj(info.Object, out)
}
func (f *FakeFactory) PrintSuccess(mapper meta.RESTMapper, shortOutput bool, out io.Writer, resource, name string, dryRun bool, operation string) {
resource, _ = mapper.ResourceSingularizer(resource)
func (f *FakeFactory) PrintSuccess(shortOutput bool, out io.Writer, resource, name string, dryRun bool, operation string) {
dryRunMsg := ""
if dryRun {
dryRunMsg = " (dry run)"
@@ -772,8 +771,7 @@ func (f *fakeAPIFactory) PrintResourceInfoForCommand(cmd *cobra.Command, info *r
return printer.PrintObj(info.Object, out)
}
func (f *fakeAPIFactory) PrintSuccess(mapper meta.RESTMapper, shortOutput bool, out io.Writer, resource, name string, dryRun bool, operation string) {
resource, _ = mapper.ResourceSingularizer(resource)
func (f *fakeAPIFactory) PrintSuccess(shortOutput bool, out io.Writer, resource, name string, dryRun bool, operation string) {
dryRunMsg := ""
if dryRun {
dryRunMsg = " (dry run)"