From 47476655e676f806fa1dd143dfccec1e98945302 Mon Sep 17 00:00:00 2001 From: JenTing Date: Sun, 8 Dec 2024 16:08:15 +0800 Subject: [PATCH] Update main.go --- main.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/main.go b/main.go index 75c3ee6..3ab79c6 100644 --- a/main.go +++ b/main.go @@ -113,15 +113,12 @@ func main() { // Remove the metadata.managedFields field unstructured.RemoveNestedField(obj.Object, "metadata", "managedFields") - fmt.Printf("Kind: %s, Name: %s/%s\n", obj.GetKind(), obj.GetName(), obj.GetNamespace()) - // Print spec.project specProject, _, err := unstructured.NestedString(obj.Object, "spec", "project") if err != nil { fmt.Printf("Error getting spec.project: %v\n", err) return } - fmt.Printf("spec.project: %s\n", specProject) // Set and Get a key-value pair key := fmt.Sprintf("%s|%s", specProject, obj.GetName()) @@ -135,9 +132,6 @@ func main() { case watch.Deleted: fmt.Println("Application deleted:", event.Object) - fmt.Printf("Kind: %s, Name: %s/%s\n", obj.GetKind(), obj.GetName(), obj.GetNamespace()) - - // Print spec.project specProject, _, err := unstructured.NestedString(obj.Object, "spec", "project") if err != nil { fmt.Printf("Error getting spec.project: %v\n", err)