From 407f44a9b7d2ba4ae020eb2585e704dc11e0e624 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Mon, 16 Sep 2024 05:13:49 -0400 Subject: [PATCH] chore: avoid unnecessary json unmarshal Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- pkg/diff/diff.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/diff/diff.go b/pkg/diff/diff.go index 2278222c3..080240a4b 100644 --- a/pkg/diff/diff.go +++ b/pkg/diff/diff.go @@ -664,12 +664,6 @@ func ThreeWayDiff(orig, config, live *unstructured.Unstructured) (*DiffResult, e } } - predictedLive := &unstructured.Unstructured{} - err = json.Unmarshal(predictedLiveBytes, predictedLive) - if err != nil { - return nil, err - } - return buildDiffResult(predictedLiveBytes, liveBytes), nil }