From 28e45877c7edf2e10f88152a725c1f4ef20a898c Mon Sep 17 00:00:00 2001 From: pashakostohrys Date: Mon, 4 Dec 2023 01:12:05 +0200 Subject: [PATCH] fix linter --- cmd/argocd/commands/app_resources.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/cmd/argocd/commands/app_resources.go b/cmd/argocd/commands/app_resources.go index cca5e08e4cf2f..5d482fcf0a0d3 100644 --- a/cmd/argocd/commands/app_resources.go +++ b/cmd/argocd/commands/app_resources.go @@ -149,28 +149,6 @@ func NewApplicationDeleteResourceCommand(clientOpts *argocdclient.ClientOptions) return command } -func parentChildInfo(nodes []v1alpha1.ResourceNode) (map[string]v1alpha1.ResourceNode, map[string][]string, map[string]struct{}) { - mapUidToNode := make(map[string]v1alpha1.ResourceNode) - mapParentToChild := make(map[string][]string) - parentNode := make(map[string]struct{}) - - for _, node := range nodes { - mapUidToNode[node.UID] = node - - if len(node.ParentRefs) > 0 { - _, ok := mapParentToChild[node.ParentRefs[0].UID] - if !ok { - var temp []string - mapParentToChild[node.ParentRefs[0].UID] = temp - } - mapParentToChild[node.ParentRefs[0].UID] = append(mapParentToChild[node.ParentRefs[0].UID], node.UID) - } else { - parentNode[node.UID] = struct{}{} - } - } - return mapUidToNode, mapParentToChild, parentNode -} - func printResources(listAll bool, orphaned bool, appResourceTree *v1alpha1.ApplicationTree, output string) { w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) headers := []interface{}{"GROUP", "KIND", "NAMESPACE", "NAME", "ORPHANED"}