Activate pg debug via config
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -29,6 +29,7 @@ type (
|
||||
Database string `json:"database"`
|
||||
PoolSize int32 `json:"pool-size"`
|
||||
CACertBundle string `json:"ca-cert-bundle"`
|
||||
Debug bool `json:"debug"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -41,6 +42,10 @@ func (cfg pgConfig) Options(options ...pg.Option) []pg.Option {
|
||||
pg.WithPoolSize(cfg.PoolSize),
|
||||
}
|
||||
|
||||
if cfg.Debug {
|
||||
opts = append(opts, pg.WithDebug())
|
||||
}
|
||||
|
||||
if cfg.CACertBundle != "" {
|
||||
var certs []*x509.Certificate
|
||||
pemData := []byte(cfg.CACertBundle)
|
||||
|
||||
Reference in New Issue
Block a user