[VOL-5374] Upgrade go version to v1.23

Change-Id: I11655451672cc7bae9cc92cddcaa563ac50d7de4
Signed-off-by: Akash Reddy Kankanala <akash.kankanala@radisys.com>
diff --git a/internal/pkg/application/application.go b/internal/pkg/application/application.go
index 7c61725..f0fa05e 100644
--- a/internal/pkg/application/application.go
+++ b/internal/pkg/application/application.go
@@ -209,20 +209,26 @@
 	MigratingServices            *util.ConcurrentMap //<vnetID,<RequestID, MigrateServicesRequest>>
 	VpvsBySvlan                  *util.ConcurrentMap // map[svlan]map[vnet_port]*VoltPortVnet
 	ConfiguredVlanForDeviceFlows *util.ConcurrentMap //map[string]map[string]bool
-	IgmpDsFlowAppliedForMvlan    map[uint16]bool
-	State                        controller.DeviceState
-	SouthBoundID                 string
-	NniPort                      string
-	Name                         string
-	SerialNum                    string
-	Ports                        sync.Map
-	VlanPortStatus               sync.Map
-	ActiveChannelsPerPon         sync.Map   // [PonPortID]*PonPortCfg
-	PonPortList                  sync.Map   // [PonPortID]map[string]string
-	ActiveChannelCountLock       sync.Mutex // This lock is used to update ActiveIGMPChannels
-	NniDhcpTrapVid               of.VlanType
-	GlobalDhcpFlowAdded          bool
-	icmpv6GroupAdded             bool
+
+	IgmpDsFlowAppliedForMvlan map[uint16]bool
+
+	Ports                sync.Map
+	VlanPortStatus       sync.Map
+	ActiveChannelsPerPon sync.Map // [PonPortID]*PonPortCfg
+	PonPortList          sync.Map // [PonPortID]map[string]string
+
+	State        controller.DeviceState
+	SouthBoundID string
+	NniPort      string
+	Name         string
+	SerialNum    string
+
+	ActiveChannelCountLock sync.Mutex // This lock is used to update ActiveIGMPChannels
+
+	NniDhcpTrapVid of.VlanType
+
+	GlobalDhcpFlowAdded bool
+	icmpv6GroupAdded    bool
 }
 
 type VoltDevInterface interface {
@@ -413,13 +419,13 @@
 type VoltAppInterface interface {
 	AddVnet(cntx context.Context, cfg VnetConfig, oper *VnetOper) error
 	AddService(cntx context.Context, cfg VoltServiceCfg, oper *VoltServiceOper) error
-	AddDeviceConfig(cntx context.Context, serialNum, hardwareIdentifier, nasID, ipAddress, uplinkPort string, nniDhcpTrapID int) error
+	AddDeviceConfig(cntx context.Context, serialNum, hardwareIdentifier, nasID, ipAddress, uplinkPort string, nniDhcpTrapID uint16) error
 	GetFlowProvisionStatus(portNo string) FlowProvisionStatus
 	DelServiceWithPrefix(cntx context.Context, prefix string) error
 	GetDevice(device string) *VoltDevice
 	GetTaskList(device string) map[int]*TaskInfo
 	AddMeterProf(cntx context.Context, cfg VoltMeter)
-	AddMvlanProfile(cntx context.Context, name string, mvlan of.VlanType, ponVlan of.VlanType, groups map[string][]string, isChannelBasedGroup bool, OLTSerialNum []string, activeChannelsPerPon int, proxy map[string]common.MulticastGroupProxy) error
+	AddMvlanProfile(cntx context.Context, name string, mvlan of.VlanType, ponVlan of.VlanType, groups map[string][]string, isChannelBasedGroup bool, OLTSerialNum []string, activeChannelsPerPon uint32, proxy map[string]common.MulticastGroupProxy) error
 	DelMvlanProfile(cntx context.Context, name string) error
 	GetMvlanProfileByTag(vlan of.VlanType) *MvlanProfile
 	AddMcastConfig(cntx context.Context, MvlanProfileID string, IgmpProfileID string, IgmpProxyIP string, OltSerialNum string) error
@@ -498,7 +504,7 @@
 	IPAddress          string `json:"ipAddress"`
 	UplinkPort         string `json:"uplinkPort"`
 	NasID              string `json:"nasId"`
-	NniDhcpTrapVid     int    `json:"nniDhcpTrapVid"`
+	NniDhcpTrapVid     uint16 `json:"nniDhcpTrapVid"`
 }
 
 // PonPortCfg contains NB port config and activeIGMPChannels count
@@ -537,7 +543,10 @@
 			continue
 		}
 		logger.Debugw(ctx, "Port recovered", log.Fields{"port": port})
-		ponPortID, _ := strconv.Atoi(key)
+		ponPortID, err := strconv.ParseUint(key, 10, 32)
+		if err != nil {
+			logger.Errorw(ctx, "Error converting string to uint32:", log.Fields{"deviceID": deviceID, "error": err})
+		}
 		nbDevice.PonPorts.Store(uint32(ponPortID), &port)
 	}
 	va.NbDevice.Store(deviceID, nbDevice)
@@ -612,7 +621,7 @@
 	return nil
 }
 
-func (va *VoltApplication) AddDeviceConfig(cntx context.Context, serialNum, hardwareIdentifier, nasID, ipAddress, uplinkPort string, nniDhcpTrapID int) error {
+func (va *VoltApplication) AddDeviceConfig(cntx context.Context, serialNum, hardwareIdentifier, nasID, ipAddress, uplinkPort string, nniDhcpTrapID uint16) error {
 	logger.Debugw(ctx, "Received Add device config", log.Fields{"SerialNumber": serialNum, "HardwareIdentifier": hardwareIdentifier, "NasID": nasID, "IPAddress": ipAddress, "UplinkPort": uplinkPort, "NniDhcpTrapID": nniDhcpTrapID})
 	var dc *DeviceConfig
 
@@ -754,11 +763,12 @@
 // AddIgmpGroups to add Igmp groups.
 func (va *VoltApplication) AddIgmpGroups(numOfGroups uint32) {
 	logger.Debugw(ctx, "AddIgmpGroups", log.Fields{"NumOfGroups": numOfGroups})
+	var i uint32
 	//TODO: Temp change to resolve group id issue in pOLT
 	//for i := 1; uint32(i) <= numOfGroups; i++ {
-	for i := 2; uint32(i) <= (numOfGroups + 1); i++ {
+	for i = 2; i <= (numOfGroups + 1); i++ {
 		ig := IgmpGroup{}
-		ig.GroupID = uint32(i)
+		ig.GroupID = i
 		va.IgmpGroupIds = append(va.IgmpGroupIds, &ig)
 	}
 }
@@ -1788,7 +1798,7 @@
 // CheckAndDeactivateService - check if the attempts for flow delete has reached threshold or not
 func (va *VoltApplication) CheckAndDeactivateService(ctx context.Context, flow *of.VoltSubFlow, devSerialNum string, devID string) {
 	logger.Debugw(ctx, "Check and Deactivate service", log.Fields{"Cookie": flow.Cookie, "FlowCount": flow.FlowCount, "DeviceSerial": devSerialNum})
-	if flow.FlowCount >= controller.GetController().GetMaxFlowRetryAttempt() {
+	if flow.FlowCount >= uint32(controller.GetController().GetMaxFlowRetryAttempt()) {
 		devConfig := va.GetDeviceConfig(devSerialNum)
 		if devConfig != nil {
 			portNo := util.GetUniPortFromFlow(devConfig.UplinkPort, flow)