From 9fd75432aca5b36f64b862d0addbcc1e01400826 Mon Sep 17 00:00:00 2001
From: Malte Bauch <malte.bauch@stud.h-da.de>
Date: Mon, 27 Nov 2023 15:02:28 +0000
Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s)

---
 controller/nucleus/networkElementWatcher.go | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/controller/nucleus/networkElementWatcher.go b/controller/nucleus/networkElementWatcher.go
index 21b910e97..8b078ea41 100644
--- a/controller/nucleus/networkElementWatcher.go
+++ b/controller/nucleus/networkElementWatcher.go
@@ -216,22 +216,7 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib
 // Paths should be provided in the following format [][]string{{"system", "config", "hostname"}}.
 func (n *NetworkElementWatcher) mergeGnmiSubscriptions(gNMISusbcriptionPathsFromMne, gNMISusbcriptionPathsFromConfig [][]string) [][]string {
 	// create slice with all elements
-	var tempJoinedPaths = gNMISusbcriptionPathsFromMne
-
-	for _, configPath := range gNMISusbcriptionPathsFromConfig {
-		tempJoinedPaths = append(tempJoinedPaths, configPath)
-	}
-
-	// sort slice
-	sort.Slice(tempJoinedPaths[:], func(i, j int) bool {
-		for elem := range tempJoinedPaths[i] {
-			if tempJoinedPaths[i][elem] == tempJoinedPaths[j][elem] {
-				continue
-			}
-			return tempJoinedPaths[i][elem] < tempJoinedPaths[j][elem]
-		}
-		return false
-	})
+	var tempJoinedPaths = append(gNMISusbcriptionPathsFromMne, gNMISusbcriptionPathsFromConfig...)
 
 	// remove duplicates
 	inResult := make(map[string]bool)
@@ -245,4 +230,5 @@ func (n *NetworkElementWatcher) mergeGnmiSubscriptions(gNMISusbcriptionPathsFrom
 	}
 
 	return joinedPaths
+
 }
-- 
GitLab