mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 17:15:31 +00:00
index endpoint start
This commit is contained in:
@@ -31,7 +31,6 @@ type FileWatcher struct {
|
||||
}
|
||||
|
||||
func NewFileWatcher() (*FileWatcher, error) {
|
||||
|
||||
fw := &FileWatcher{mu: sync.Mutex{}}
|
||||
fw.Watch()
|
||||
return fw, nil
|
||||
@@ -96,8 +95,8 @@ func (fw *FileWatcher) Watch() error {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
log.Println("event:", event)
|
||||
if !event.Has(fsnotify.Chmod) {
|
||||
log.Println("event:", event)
|
||||
fw.mu.Lock()
|
||||
for _, wf := range fw.wf {
|
||||
wf(event.Name)
|
||||
|
||||
Reference in New Issue
Block a user