[VOL-5475] upgrade go to 1.24.5 and golangci-lint version to 2.2.2

Change-Id: Ife0505678221ac9769b3443bedfdf1ef4387ae31
Signed-off-by: mgouda <madhumati.gouda@radisys.com>
diff --git a/internal/pkg/core/statsmanager.go b/internal/pkg/core/statsmanager.go
index 1169904..3e1db2e 100644
--- a/internal/pkg/core/statsmanager.go
+++ b/internal/pkg/core/statsmanager.go
@@ -316,21 +316,22 @@
 	   :return:
 	*/
 	var i uint32
-	if Intftype == "nni" {
+	switch Intftype {
+	case "nni":
 		NniPorts := make(map[uint32]*NniPort)
 		for i = 0; i < numOfPorts; i++ {
 			Port := BuildPortObject(ctx, i, "nni", DeviceID).(*NniPort)
 			NniPorts[Port.IntfID] = Port
 		}
 		return NniPorts, nil
-	} else if Intftype == "pon" {
+	case "pon":
 		PONPorts := make(map[uint32]*PonPort)
 		for i = 0; i < numOfPorts; i++ {
 			PONPort := BuildPortObject(ctx, i, "pon", DeviceID).(*PonPort)
 			PONPorts[plt.PortNoToIntfID(PONPort.IntfID, voltha.Port_PON_OLT)] = PONPort
 		}
 		return PONPorts, nil
-	} else {
+	default:
 		logger.Errorw(ctx, "invalid-type-of-interface", log.Fields{"interface-type": Intftype})
 		return nil, olterrors.NewErrInvalidValue(log.Fields{"interface-type": Intftype}, nil)
 	}
@@ -349,7 +350,8 @@
 
 	// This builds a port object which is added to the
 	// appropriate northbound or southbound values
-	if IntfType == "nni" {
+	switch IntfType {
+	case "nni":
 		IntfID := plt.IntfIDToPortNo(PortNum, voltha.Port_ETHERNET_NNI)
 		nniID := plt.PortNoToIntfID(IntfID, voltha.Port_ETHERNET_NNI)
 		logger.Debugw(ctx, "interface-type-nni",
@@ -357,7 +359,7 @@
 				"nni-id":    nniID,
 				"intf-type": IntfType})
 		return NewNniPort(PortNum, nniID)
-	} else if IntfType == "pon" {
+	case "pon":
 		// PON ports require a different configuration
 		//  intf_id and pon_id are currently equal.
 		IntfID := plt.IntfIDToPortNo(PortNum, voltha.Port_PON_OLT)
@@ -367,7 +369,7 @@
 				"pon-id":    PONID,
 				"intf-type": IntfType})
 		return NewPONPort(PONID, DeviceID, IntfID, PortNum)
-	} else {
+	default:
 		logger.Errorw(ctx, "invalid-type-of-interface", log.Fields{"intf-type": IntfType})
 		return nil
 	}
@@ -589,11 +591,12 @@
 	metricsContext["devicetype"] = devType
 	metricsContext["portlabel"] = port.Label
 
-	if statType == NNIStats {
+	switch statType {
+	case NNIStats:
 		volthaEventSubCatgry = voltha.EventSubCategory_NNI
-	} else if statType == PONStats {
+	case PONStats:
 		volthaEventSubCatgry = voltha.EventSubCategory_PON
-	} else if statType == GEMStats || statType == ONUStats {
+	case GEMStats, ONUStats:
 		volthaEventSubCatgry = voltha.EventSubCategory_ONT
 	}