mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-11 14:35: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:
@@ -109,7 +109,7 @@ func (r *GormCarrierRepository) SaveCarrier(ctx context.Context, carrier *smdp.C
|
||||
// UpdateCarrierMetrics updates carrier metrics
|
||||
func (r *GormCarrierRepository) UpdateCarrierMetrics(ctx context.Context, id string, metrics *smdp.CarrierMetrics) error {
|
||||
// Persist metrics alongside the carrier record
|
||||
updates := map[string]interface{}{
|
||||
updates := map[string]any{
|
||||
"updated_at": time.Now(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user