remove unnecessarily flexibiliy to simplify the resource builder

This commit is contained in:
David Eads
2018-04-27 08:40:57 -04:00
parent 61fdd880b2
commit 6fbcbc994f
33 changed files with 154 additions and 152 deletions

View File

@@ -342,19 +342,16 @@ func (f *TestFactory) Command(*cobra.Command, bool) string {
}
func (f *TestFactory) NewBuilder() *resource.Builder {
mapper, typer := f.Object()
mapper, _ := f.Object()
return resource.NewBuilder(
&resource.Mapper{
RESTMapper: mapper,
ObjectTyper: typer,
ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
ObjectConverter: legacyscheme.Scheme,
Decoder: cmdutil.InternalVersionDecoder(),
RESTMapper: mapper,
ClientMapper: resource.ClientMapperFunc(f.ClientForMapping),
Decoder: cmdutil.InternalVersionDecoder(),
},
&resource.Mapper{
RESTMapper: mapper,
ObjectTyper: typer,
ClientMapper: resource.ClientMapperFunc(f.UnstructuredClientForMapping),
Decoder: unstructured.UnstructuredJSONScheme,
},