From 82a45048f5c11107d4ede2648cca74cdf7a94194 Mon Sep 17 00:00:00 2001 From: 0ceanSlim Date: Thu, 5 Sep 2024 11:02:45 -0400 Subject: [PATCH] move config watcher to config package --- {server/utils => config}/watchConfig.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename {server/utils => config}/watchConfig.go (98%) diff --git a/server/utils/watchConfig.go b/config/watchConfig.go similarity index 98% rename from server/utils/watchConfig.go rename to config/watchConfig.go index 4643c81..b848758 100644 --- a/server/utils/watchConfig.go +++ b/config/watchConfig.go @@ -1,4 +1,4 @@ -package utils +package config import ( "fmt" diff --git a/main.go b/main.go index 04ac759..5280614 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ func main() { utils.EnsureFileExists("relay_metadata.json", "app/static/examples/relay_metadata.example.json") restartChan := make(chan struct{}) - go utils.WatchConfigFile("config.yml", restartChan) // Critical goroutine + go config.WatchConfigFile("config.yml", restartChan) // Critical goroutine signalChan := make(chan os.Signal, 1) signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM)