replace profiler with logger, update logger option to bool

This commit is contained in:
Tit Petric
2019-08-06 20:27:35 +00:00
parent c4da01853d
commit cc3c100c62
5 changed files with 45 additions and 47 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import (
type (
DBOpt struct {
DSN string `env:"DB_DSN"`
Profiler string `env:"DB_PROFILER"`
Logger bool `env:"DB_LOGGER"`
MaxTries int `env:"DB_MAX_TRIES"`
Delay time.Duration `env:"DB_CONN_ERR_DELAY"`
Timeout time.Duration `env:"DB_CONN_TIMEOUT"`
@@ -17,7 +17,7 @@ type (
func DB(pfix string) (o *DBOpt) {
o = &DBOpt{
DSN: "corteza:corteza@tcp(db:3306)/corteza?collation=utf8mb4_general_ci",
Profiler: "none",
Logger: false,
MaxTries: 100,
Delay: 5 * time.Second,
Timeout: 1 * time.Minute,