@@ -65,14 +65,14 @@ func RenderFromJSON(o resource.Object, data []byte) error {
65
65
func RenderEnvironmentPatches (env * unstructured.Unstructured , oxr , dxr * composite.Unstructured , ps []v1beta1.EnvironmentPatch ) error {
66
66
for i , p := range ps {
67
67
p := p
68
- switch p .Type {
68
+ switch p .GetType () {
69
69
case v1beta1 .PatchTypeToEnvironmentFieldPath , v1beta1 .PatchTypeCombineToEnvironment :
70
70
if err := ApplyToObjects (& p , env , oxr ); err != nil {
71
- return errors .Wrapf (err , errFmtPatch , p .Type , i )
71
+ return errors .Wrapf (err , errFmtPatch , p .GetType () , i )
72
72
}
73
73
case v1beta1 .PatchTypeFromEnvironmentFieldPath , v1beta1 .PatchTypeCombineFromEnvironment :
74
74
if err := ApplyToObjects (& p , env , dxr ); err != nil {
75
- return errors .Wrapf (err , errFmtPatch , p .Type , i )
75
+ return errors .Wrapf (err , errFmtPatch , p .GetType () , i )
76
76
}
77
77
case v1beta1 .PatchTypePatchSet , v1beta1 .PatchTypeFromCompositeFieldPath , v1beta1 .PatchTypeCombineFromComposite , v1beta1 .PatchTypeToCompositeFieldPath , v1beta1 .PatchTypeCombineToComposite :
78
78
// nothing to do
@@ -95,7 +95,7 @@ func RenderComposedPatches( //nolint:gocyclo // just a switch
95
95
) (errs []error , store bool ) {
96
96
for i , p := range ps {
97
97
p := p
98
- switch t := p .Type ; t {
98
+ switch t := p .GetType () ; t {
99
99
case v1beta1 .PatchTypeToCompositeFieldPath , v1beta1 .PatchTypeCombineToComposite :
100
100
// TODO(negz): Should failures to patch the XR be terminal? It could
101
101
// indicate a required patch failed. A required patch means roughly
0 commit comments