From 3d7a3a043f251d24a76e090f57af0fd5b7ce5359 Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Date: Sat, 17 May 2025 21:08:12 +0330 Subject: [PATCH] Refactor config usage to access values through Config singleton --- cmd/CatsOfMastodonBotGo/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/CatsOfMastodonBotGo/main.go b/cmd/CatsOfMastodonBotGo/main.go index cb1bef4..261e061 100644 --- a/cmd/CatsOfMastodonBotGo/main.go +++ b/cmd/CatsOfMastodonBotGo/main.go @@ -14,7 +14,6 @@ import ( func main() { // Setup config config.Init() - var config = config.Load() // Initialize database @@ -29,7 +28,7 @@ func main() { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() var posts []domain.Post = nil - err, posts := services.PostServiceInstance.GetPostsFromApi(ctx, config.Tag, config.Instance) + err, posts := services.PostServiceInstance.GetPostsFromApi(ctx, config.Config.Tag, config.Config.Instance) if err != nil { log.Println(err) return