refactor(watcher): rename events package to watcherEvents

- Updated import paths and references from events to watcherEvents across multiple files
This commit is contained in:
yusing
2026-02-15 14:35:23 +08:00
parent d619562f00
commit 1244af0e38
9 changed files with 30 additions and 30 deletions

View File

@@ -10,7 +10,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/yusing/godoxy/internal/common"
"github.com/yusing/godoxy/internal/watcher"
"github.com/yusing/godoxy/internal/watcher/events"
watcherEvents "github.com/yusing/godoxy/internal/watcher/events"
"github.com/yusing/goutils/fs"
"github.com/yusing/goutils/task"
)
@@ -80,13 +80,13 @@ func watchDir() {
}
filename := event.ActorName
switch event.Action {
case events.ActionFileWritten:
case watcherEvents.ActionFileWritten:
fileContentMap.Delete(filename)
loadContent()
case events.ActionFileDeleted:
case watcherEvents.ActionFileDeleted:
fileContentMap.Delete(filename)
log.Warn().Msgf("error page resource %s deleted", filename)
case events.ActionFileRenamed:
case watcherEvents.ActionFileRenamed:
log.Warn().Msgf("error page resource %s deleted", filename)
fileContentMap.Delete(filename)
loadContent()