mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-17 09:49:13 +00:00
Reduce unstruct notation noise in Resource construction.
This commit is contained in:
@@ -101,7 +101,7 @@ func (m ResMap) insert(newName string, obj *unstructured.Unstructured) error {
|
||||
return fmt.Errorf("The <name: %q, GroupVersionKind: %v> already exists in the map", oldName, gvk)
|
||||
}
|
||||
obj.SetName(newName)
|
||||
m[id] = resource.NewBehaviorlessResource(obj)
|
||||
m[id] = resource.NewResourceFromUnstruct(*obj)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ func newResourceSliceFromBytes(in []byte) ([]*resource.Resource, error) {
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
result = append(result, resource.NewBehaviorlessResource(&out))
|
||||
result = append(result, resource.NewResourceFromUnstruct(out))
|
||||
}
|
||||
if err != io.EOF {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user