From b48037f4dc602bd35b38c9cba0f50dd0f8033288 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 14 Aug 2025 09:30:08 +0800 Subject: Refactoring --- forged/internal/database/database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'forged/internal/database/database.go') diff --git a/forged/internal/database/database.go b/forged/internal/database/database.go index 6674fe6..f353fe8 100644 --- a/forged/internal/database/database.go +++ b/forged/internal/database/database.go @@ -19,8 +19,8 @@ type Database struct { // Open opens a new database connection pool using the provided connection // string. It returns a Database instance and an error if any occurs. // It is run indefinitely in the background. -func Open(connString string) (Database, error) { - db, err := pgxpool.New(context.Background(), connString) +func Open(ctx context.Context, config Config) (Database, error) { + db, err := pgxpool.New(ctx, config.Conn) return Database{db}, err } -- cgit v1.2.3