From 9a10d6e583ba24519df182243a9e07eb2a2c9d64 Mon Sep 17 00:00:00 2001 From: James Alseth Date: Sat, 8 Feb 2025 19:54:12 -0800 Subject: [PATCH] chore: Fix "marshalled" typo Signed-off-by: James Alseth --- internal/commands/create.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/commands/create.go b/internal/commands/create.go index 334dfb1f..91d16ced 100644 --- a/internal/commands/create.go +++ b/internal/commands/create.go @@ -403,15 +403,15 @@ func setMatchLabelsMatcher(constraint *unstructured.Unstructured, matcher rego.M } func setMatchExpressionsMatcher(constraint *unstructured.Unstructured, matcher []rego.MatchExpressionMatcher) error { - marshalled, err := json.Marshal(matcher) + marshaled, err := json.Marshal(matcher) if err != nil { return err } - var unmarshalled []interface{} - if err := json.Unmarshal(marshalled, &unmarshalled); err != nil { + var unmarshaled []interface{} + if err := json.Unmarshal(marshaled, &unmarshaled); err != nil { return err } - return unstructured.SetNestedSlice(constraint.Object, unmarshalled, "spec", "match", "labelSelector", "matchExpressions") + return unstructured.SetNestedSlice(constraint.Object, unmarshaled, "spec", "match", "labelSelector", "matchExpressions") } func setNestedStringSlice(constraint *unstructured.Unstructured, slice []string, path ...string) error {