add Local and Unstructured builder attributes

Moves DisabledClientMapperForMapping wrapper to new Local attribute.
Removes Factory#NewUnstructuredBuilder in favor of new Unstructured
builder attribute.
This commit is contained in:
juanvallejo
2017-08-02 16:23:07 -04:00
parent c10f4f78bc
commit 90d76adb4b
39 changed files with 143 additions and 157 deletions

View File

@@ -170,19 +170,15 @@ func (o *DeleteOptions) Complete(f cmdutil.Factory, out, errOut io.Writer, args
}
// Set up client based support.
mapper, _, err := f.UnstructuredObject()
if err != nil {
return err
}
builder, err := f.NewUnstructuredBuilder(true)
mapper, typer, err := f.UnstructuredObject()
if err != nil {
return err
}
o.Mapper = mapper
includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false)
r := builder.
r := f.NewBuilder().
Unstructured(f.UnstructuredClientForMapping, mapper, typer).
ContinueOnError().
NamespaceParam(cmdNamespace).DefaultNamespace().
FilenameParam(enforceNamespace, &o.FilenameOptions).