Upgraded to go1.22 + replaced log with slog
This commit is contained in:
1 parent
67c72e8b4f
commit
b4288b2abb
9 files changed
+97
-43
No files matched your search
+3
-3
@@ -12,9 +12,9 @@ var DevMigrations embed.FS
|
||||
//go:embed prod/*.sql
|
||||
var ProdMigrations embed.FS
|
||||
|
||||
func ConnectToDbNamed(host string, port string, user string, password string, dbname string) (*sqlx.DB, error) {
|
||||
psqlInfo := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=disable",
|
||||
host, port, user, password, dbname)
|
||||
func ConnectToDbNamed(host string, port string, user string, password string, dbname string, sslMode string, schema string) (*sqlx.DB, error) {
|
||||
psqlInfo := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=%s search_path=%s",
|
||||
host, port, user, password, dbname, sslMode, schema)
|
||||
|
||||
db, err := sqlx.Open("postgres", psqlInfo)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user