INNER CODE UNIT · Go

main

mpiorowski/sgsg · service-profile/main.go:19

func main() {
	// Set up the logger
	system.InitLogger()

	// Connect to the database
	storage, err, clean := system.NewStorage()
	defer clean()
	if err != nil {
		slog.Error("Error opening database", "db.Connect", err)
		panic(err)
	}
	slog.Info("Database connected")

	// Run migrations
	err = storage.Migrations()
	if err != nil {
		slog.Error("Error running migrations", "db.Migrations", err)
		panic(err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…