fix(config): fix configuration management
This commit is contained in:
@@ -16,8 +16,8 @@ type Service struct {
|
||||
// NewService initializes and returns a new database service.
|
||||
func NewService(cfg *config.DatabaseConfig) (*Service, error) {
|
||||
connStr := fmt.Sprintf("user=%s password=%s dbname=%s host=%s port=%d sslmode=%s",
|
||||
cfg.User, cfg.Password, cfg.Dbname,
|
||||
cfg.Host, cfg.Port, cfg.Sslmode,
|
||||
cfg.User, cfg.Password, cfg.DBName,
|
||||
cfg.Host, cfg.Port, cfg.SSLMode,
|
||||
)
|
||||
|
||||
db, err := sql.Open("postgres", connStr)
|
||||
|
Reference in New Issue
Block a user