@@ -106,8 +106,14 @@ func ProcessSpec(objName string, appMeta helmify.AppMetadata, spec corev1.PodSpe
106106 }
107107 if spec .Tolerations != nil {
108108 tolerations := make ([]any , len (spec .Tolerations ))
109- inrec , _ := json .Marshal (spec .Tolerations )
110- json .Unmarshal (inrec , & tolerations )
109+ inrec , err := json .Marshal (spec .Tolerations )
110+ if err != nil {
111+ return nil , nil , err
112+ }
113+ err = json .Unmarshal (inrec , & tolerations )
114+ if err != nil {
115+ return nil , nil , err
116+ }
111117 err = unstructured .SetNestedSlice (values , tolerations , objName , "tolerations" )
112118 if err != nil {
113119 return nil , nil , err
@@ -126,8 +132,14 @@ func ProcessSpec(objName string, appMeta helmify.AppMetadata, spec corev1.PodSpe
126132 }
127133 if spec .TopologySpreadConstraints != nil {
128134 topologySpreadConstraints := make ([]any , len (spec .TopologySpreadConstraints ))
129- inrec , _ := json .Marshal (spec .TopologySpreadConstraints )
130- json .Unmarshal (inrec , & topologySpreadConstraints )
135+ inrec , err := json .Marshal (spec .TopologySpreadConstraints )
136+ if err != nil {
137+ return nil , nil , err
138+ }
139+ err = json .Unmarshal (inrec , & topologySpreadConstraints )
140+ if err != nil {
141+ return nil , nil , err
142+ }
131143 err = unstructured .SetNestedSlice (values , topologySpreadConstraints , objName , "topologySpreadConstraints" )
132144 if err != nil {
133145 return nil , nil , err
0 commit comments