mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-19 07:43:54 +01:00
fixed startup crash for file provider
This commit is contained in:
@@ -20,11 +20,10 @@ func NewFileWatcher(filename string) Watcher {
|
||||
}
|
||||
|
||||
func (f *fileWatcher) Events(ctx context.Context) (<-chan Event, <-chan E.NestedError) {
|
||||
if fwHelper == nil {
|
||||
fwHelper = newFileWatcherHelper(common.ConfigBasePath)
|
||||
}
|
||||
return fwHelper.Add(ctx, f)
|
||||
}
|
||||
|
||||
func InitFileWatcherHelper() {
|
||||
fwHelper = newFileWatcherHelper(common.ConfigBasePath)
|
||||
}
|
||||
|
||||
var fwHelper *fileWatcherHelper
|
||||
|
||||
Reference in New Issue
Block a user