mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-14 16:05:13 +00:00
refactor: Replace interface{} with any and optimize slice operations
- Replace map[string]interface{} with map[string]any in UpdateCarrierMetrics
- Replace interface{} with any for GeneratedAt field in PricingEffectiveness struct
- Replace loop-based empty string checks with slices.Contains in ValidateConditions
- Replace range loop index initialization with range-only syntax in calculateAPIPerformance
- Add slices import for standard library slice utilities
This commit is contained in:
@@ -95,7 +95,7 @@ func (s *TenantServiceImpl) calculateAPIPerformance(requests []*tenant.APIReques
|
||||
copy(sortedResponseTimes, responseTimes)
|
||||
|
||||
// Sort response times
|
||||
for i := 0; i < len(sortedResponseTimes); i++ {
|
||||
for i := range sortedResponseTimes {
|
||||
for j := 0; j < len(sortedResponseTimes)-1-i; j++ {
|
||||
if sortedResponseTimes[j] > sortedResponseTimes[j+1] {
|
||||
sortedResponseTimes[j], sortedResponseTimes[j+1] = sortedResponseTimes[j+1], sortedResponseTimes[j]
|
||||
|
||||
Reference in New Issue
Block a user