Skip to content

Commit df5d3d2

Browse files
fix lint errors
1 parent 6459f97 commit df5d3d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cns/restserver/ipam.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ func (service *HTTPRestService) AssignAvailableIPConfigs(podInfo cns.PodInfo) ([
998998
}
999999

10001000
// Get the number of distinct IP families (IPv4/IPv6) across all NC's
1001-
numOfIPFamilies := service.GetIpFamilyCount()
1001+
numOfIPFamilies := service.GetIPFamilyCount()
10021002

10031003
// Get the actual IP families map for validation
10041004
ncIPFamilies := service.getIPFamiliesMap()
@@ -1088,7 +1088,7 @@ func (service *HTTPRestService) AssignAvailableIPConfigs(podInfo cns.PodInfo) ([
10881088
return podIPInfo, fmt.Errorf("not enough IPs available, waiting on Azure CNS to allocate more")
10891089
}
10901090

1091-
logger.Printf("[AssignAvailableIPConfigs] Successfully assigned IPs for pod %+v", podInfo)
1091+
logger.Printf("[AssignAvailableIPConfigs] Successfully assigned IPs for pod %+v", podInfo) //nolint:staticcheck // Todo: legacy logger usage is consistent in cns repo. Migrates when all logger usage is migrated
10921092
return podIPInfo, nil
10931093
}
10941094

@@ -1389,10 +1389,10 @@ func (service *HTTPRestService) getIPFamiliesMap() map[cns.IPFamily]struct{} {
13891389
return ncIPFamilies
13901390
}
13911391

1392-
// GetIpFamilyCount returns the number of distinct IP families (IPv4/IPv6) across all NC's.
1392+
// GetIPFamilyCount returns the number of distinct IP families (IPv4/IPv6) across all NC's.
13931393
// This is used to determine how many IPs to assign per pod:
13941394
// - In single-stack: 1 IP per pod
13951395
// - In dual-stack: 2 IPs per pod (one IPv4, one IPv6)
1396-
func (service *HTTPRestService) GetIpFamilyCount() int {
1396+
func (service *HTTPRestService) GetIPFamilyCount() int {
13971397
return len(service.getIPFamiliesMap())
13981398
}

0 commit comments

Comments
 (0)