Skip to content

Commit bbdbb95

Browse files
committed
Created toml file with db config
1 parent 0958a54 commit bbdbb95

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

db.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const (
1010
DB_USER = "user"
1111
DB_PASSWORD = "password"
1212
DB_NAME = "dbname"
13-
DB_HOST = "dbname"
13+
DB_HOST = "127.0.0.1"
1414
DB_PORT = "5432"
15-
DB_SSLMODE = "disabled"
15+
DB_SSLMODE = "disable"
1616
)
1717

1818
func GetDbConnection() (*sql.DB, error) {

testapp/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[database]
2+
user = "user"
3+
password = "password"
4+
database = "dbname"
5+
host = "127.0.0.1"
6+
port = "5434"
7+
sslmode = "disable"

0 commit comments

Comments
 (0)