Refactor config usage to access values through Config singleton
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user