Skip to content

Commit 96c5cf6

Browse files
author
YuChen
committed
fix go format
Signed-off-by: YuChen <[email protected]>
1 parent f5a2f34 commit 96c5cf6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

controllers/operandrequest/reconcile_operand.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,11 +1066,10 @@ func (r *Reconciler) updateK8sResource(ctx context.Context, existingK8sRes unstr
10661066

10671067
if k8sResConfig != nil {
10681068
k8sResConfigDecoded := make(map[string]interface{})
1069-
k8sResConfigUnmarshalErr := json.Unmarshal(k8sResConfig.Raw, &k8sResConfigDecoded)
1070-
if k8sResConfigUnmarshalErr != nil {
1071-
klog.Errorf("failed to unmarshal k8s Resource Config: %v", k8sResConfigUnmarshalErr)
1069+
if k8sResConfigUnmarshalErr := json.Unmarshal(k8sResConfig.Raw, &k8sResConfigDecoded); k8sResConfigUnmarshalErr != nil {
1070+
return errors.Wrap(k8sResConfigUnmarshalErr, "failed to unmarshal k8s Resource Config")
10721071
}
1073-
1072+
10741073
if host, found := k8sResConfigDecoded["spec"].(map[string]interface{})["host"].(string); found {
10751074
hostHash := util.CalculateHash(host)
10761075

0 commit comments

Comments
 (0)