parent
308742d054
commit
f7959d3333
|
@ -146,7 +146,7 @@ func GetAuth0AccessToken() string {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
defer res.Body.Close()
|
defer res.Body.Close() //nolint:errcheck // it's defered
|
||||||
body, err := ioutil.ReadAll(res.Body)
|
body, err := ioutil.ReadAll(res.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
|
|
|
@ -38,6 +38,6 @@ func New(level zapcore.Level) *logger {
|
||||||
log.Fatal("logger.New: 💣 ⛔ zap logger init fail")
|
log.Fatal("logger.New: 💣 ⛔ zap logger init fail")
|
||||||
}
|
}
|
||||||
// theLogger.SetLevel
|
// theLogger.SetLevel
|
||||||
defer theLogger.Sync()
|
defer theLogger.Sync() //nolint:errcheck // it's defered
|
||||||
return theLogger.Sugar()
|
return theLogger.Sugar()
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,6 @@ func InitDB() {
|
||||||
sugar.Fatalf("app.InitDB: 💣 ⛔ Can't log on to DBMS host: %w", err)
|
sugar.Fatalf("app.InitDB: 💣 ⛔ Can't log on to DBMS host: %w", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, err = db.Exec("set foreign_key_check=0")
|
|
||||||
if err != nil {
|
|
||||||
sugar.Warnf("app.InitDB: 💣⛔ can't disable foreign key check")
|
|
||||||
}
|
|
||||||
MyDB = db
|
MyDB = db
|
||||||
sugar.Debugf("app.InitDB: 👍 📤 %s", GetDBMS())
|
sugar.Debugf("app.InitDB: 👍 📤 %s", GetDBMS())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue