package main

import (
	"gemini-balancer/internal/app"
	"gemini-balancer/internal/container"
	"gemini-balancer/internal/logging"
	"log"
)

func main() {
	defer logging.Close()
	cont, err := container.BuildContainer()
	if err != nil {
		log.Fatalf("FATAL: Failed to build dependency container: %v", err)
	}
	err = cont.Invoke(func(application *app.App) error {
		return application.Run()
	})
	if err != nil {
		log.Fatalf("FATAL: Error during application execution: %v", err)
	}
}
