fix the defer

This commit is contained in:
Cipher Vance
2025-11-15 13:51:02 -06:00
parent e7bdc8ed91
commit a61373e5f4

View File

@@ -48,7 +48,8 @@ func Init(cfg *config.Config) {
db.SetMaxIdleConns(5)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel
defer cancel()
if err = db.PingContext(ctx); err != nil {
log.Fatalf("Failed to ping database: %v", err)
}