Ajouter et implémenter db flags

Ajouter config.RegisterBool
This commit is contained in:
Victor Lacasse-Beaudoin 2023-09-16 18:40:18 -04:00
parent 4bbc91878f
commit 7e3531aa90
2 changed files with 58 additions and 1 deletions

View file

@ -34,7 +34,7 @@ var apiCmd = &cobra.Command{
bottinApiClient := bottindata.NewApiClient(cfg.Bottin.API.Key, cfg.Bottin.API.Host, cfg.Bottin.API.Protocol, cfg.Bottin.API.Port)
dbClient, err := dbclient.New("db", "bottinag", "bottinag", "bottinag", 5432, false)
dbClient, err := dbclient.New(cfg.DB.Host, cfg.DB.Database, cfg.DB.User, cfg.DB.Password, cfg.DB.Port, cfg.DB.UseSSL)
if err != nil {
log.Fatal(err)
}