update
parent
df967ca290
commit
c6038a8f0c
5
db.go
5
db.go
|
@ -18,9 +18,12 @@ func connectToDB() {
|
|||
DB_HOST, DB_USER, DB_PASSWD, DB_NAME, DB_PORT,
|
||||
)
|
||||
config := &gorm.Config{
|
||||
Logger: logger.Default,
|
||||
Logger: logger.Discard,
|
||||
SkipDefaultTransaction: true,
|
||||
}
|
||||
if flagDev {
|
||||
config.Logger = logger.Default
|
||||
}
|
||||
for {
|
||||
db, err := gorm.Open(postgres.New(postgres.Config{
|
||||
DSN: dsn, // data source name
|
||||
|
|
Loading…
Reference in New Issue