Use %d instead of %s to sprintf integer #5

Merged
snaums merged 1 commits from nwesterhausen/mvoCI:bugfix/sfmt-int into master 8 months ago
  1. 4
      core/models.go

4
core/models.go

@ -165,7 +165,7 @@ func connection_settings ( cfg *Config ) string {
cfg.Database.Host,
cfg.Database.Dbname)
case "postgres":
x = fmt.Sprintf("user=%s password=%s host=%s dbname=%s port=%s sslmode=%s",
x = fmt.Sprintf("user=%s password=%s host=%s dbname=%s port=%d sslmode=%s",
cfg.Database.Username,
cfg.Database.Password,
cfg.Database.Host,
@ -173,7 +173,7 @@ func connection_settings ( cfg *Config ) string {
cfg.Database.Port,
cfg.Database.PostgresSSL)
case "mssql":
x = fmt.Sprintf("sqlserver://%s:%s@%s:%s?database=%s",
x = fmt.Sprintf("sqlserver://%s:%s@%s:%d?database=%s",
cfg.Database.Username,
cfg.Database.Password,
cfg.Database.Host,

Loading…
Cancel
Save