Przeglądaj źródła

chore: unexport existingtimers

jamesread 7 miesięcy temu
rodzic
commit
3d1ba75ff5
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      service/internal/oncalendarfile/calendar.go

+ 4 - 4
service/internal/oncalendarfile/calendar.go

@@ -19,12 +19,12 @@ type timerEntry struct {
 	cancel context.CancelFunc
 }
 
-type ExistingTimers struct {
+type existingTimers struct {
 	timers map[time.Time]timerEntry
 }
 
 var (
-	scheduleMap      = make(map[string]ExistingTimers)
+	scheduleMap      = make(map[string]existingTimers)
 	scheduleMapMutex sync.RWMutex
 )
 
@@ -58,7 +58,7 @@ func clearExistingTimers(action *config.Action) {
 		}
 	}
 
-	scheduleMap[action.ID] = ExistingTimers{
+	scheduleMap[action.ID] = existingTimers{
 		timers: make(map[time.Time]timerEntry),
 	}
 }
@@ -133,7 +133,7 @@ func sleepUntil(ctx context.Context, instant time.Time, action *config.Action, c
 
 	scheduleMapMutex.Lock()
 	if _, exists := scheduleMap[action.ID]; !exists {
-		scheduleMap[action.ID] = ExistingTimers{
+		scheduleMap[action.ID] = existingTimers{
 			timers: make(map[time.Time]timerEntry),
 		}
 	}