Refactor config usage to access values through Config singleton

This commit is contained in:
2025-05-17 21:08:12 +03:30
parent a1b3bfa18d
commit 3d7a3a043f

View File

@@ -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