remove onConfigChange as not supported on Alpine Linux

This commit is contained in:
2020-01-16 12:53:44 +01:00
parent 4aa8b0bcec
commit 878e032fcb

11
main.go
View File

@@ -11,7 +11,6 @@ import (
"time" "time"
"github.com/chromedp/chromedp" "github.com/chromedp/chromedp"
"github.com/fsnotify/fsnotify"
"github.com/lunny/html2md" "github.com/lunny/html2md"
"github.com/robfig/cron/v3" "github.com/robfig/cron/v3"
"github.com/spf13/viper" "github.com/spf13/viper"
@@ -61,10 +60,12 @@ login:
// Config file was found but another error was produced // Config file was found but another error was produced
} }
} }
viper.WatchConfig()
viper.OnConfigChange(func(e fsnotify.Event) { // This does not work on Alpine Linux ... maybe under other linux variations
fmt.Println("Config file changed:", e.Name) //viper.WatchConfig()
}) //viper.OnConfigChange(func(e fsnotify.Event) {
// fmt.Println("Config file changed:", e.Name)
//})
html2md.AddRule("span", &html2md.Rule{ html2md.AddRule("span", &html2md.Rule{
Patterns: []string{"span"}, Patterns: []string{"span"},