diff --git a/go.mod b/go.mod index dc771f7..94d19c1 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Luzifer/go-latestver go 1.19 require ( - github.com/Luzifer/go_helpers/v2 v2.15.3 + github.com/Luzifer/go_helpers/v2 v2.16.0 github.com/Luzifer/rconfig/v2 v2.4.0 github.com/antchfx/htmlquery v1.3.0 github.com/antchfx/jsonquery v1.3.2 diff --git a/go.sum b/go.sum index 3518e54..b03cc8a 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ -github.com/Luzifer/go_helpers/v2 v2.15.2 h1:1L96lhh/E9JKyHoYcBelmjz2pV9qp+u2Ap6fPsfsUrc= -github.com/Luzifer/go_helpers/v2 v2.15.2/go.mod h1:C5EkTBawA4sJt0CHoAoblgGPwTjW9blXZ/Et6RiEu6Q= -github.com/Luzifer/go_helpers/v2 v2.15.3 h1:g7EyKdfftZxEcJmDN3LePVs+QbXU/YqcLlPSMGiZ1Ek= -github.com/Luzifer/go_helpers/v2 v2.15.3/go.mod h1:C5EkTBawA4sJt0CHoAoblgGPwTjW9blXZ/Et6RiEu6Q= +github.com/Luzifer/go_helpers/v2 v2.16.0 h1:Au+q+IJg5eIU7N2tnU6DVl/gHvSWXkN4GmdgzvfsLu0= +github.com/Luzifer/go_helpers/v2 v2.16.0/go.mod h1:C5EkTBawA4sJt0CHoAoblgGPwTjW9blXZ/Et6RiEu6Q= github.com/Luzifer/rconfig/v2 v2.4.0 h1:MAdymTlExAZ8mx5VG8xOFAtFQSpWBipKYQHPOmYTn9o= github.com/Luzifer/rconfig/v2 v2.4.0/go.mod h1:hWF3ZVSusbYlg5bEvCwalEyUSY+0JPJWUiIu7rBmav8= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= diff --git a/main.go b/main.go index f951c18..b5b9736 100644 --- a/main.go +++ b/main.go @@ -74,7 +74,16 @@ func main() { } if cfg.WatchConfig { - fsWatch, err := fileHelper.NewSimpleWatcher(cfg.Config, time.Minute) + fsWatch, err := fileHelper.NewWatcherWithOpts( + cfg.Config, + fileHelper.WatcherOpts{ + FollowSymlinks: true, + }, + time.Minute, + fileHelper.WatcherCheckPresence, + fileHelper.WatcherCheckSize, + fileHelper.WatcherCheckMtime, + ) if err != nil { log.WithError(err).Fatal("creating config file watcher") }