Skip to content

Commit

Permalink
config: don't print
Browse files Browse the repository at this point in the history
  • Loading branch information
USA-RedDragon committed Feb 18, 2024
1 parent 9cc7d6e commit 77ee705
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
23 changes: 0 additions & 23 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,28 +203,5 @@ func GetConfig(cmd *cobra.Command) *Config {
}
}

if currentConfig.Debug {
fmt.Println(currentConfig.ToString())
}

return &currentConfig
}

// ToString returns a string representation of the configuration
func (config *Config) ToString() string {
return "Debug: " + strconv.FormatBool(config.Debug) + "\n" +
"Port: " + strconv.Itoa(config.Port) + "\n" +
"PasswordSalt: " + config.PasswordSalt + "\n" +
"OTLPEndpoint: " + config.OTLPEndpoint + "\n" +
"InitialAdminUserPassword: " + config.InitialAdminUserPassword + "\n" +
"HIBPAPIKey: " + config.HIBPAPIKey + "\n" +
"PostgresDSN: " + config.PostgresDSN + "\n" +
"PostgresUser: " + config.postgresUser + "\n" +
"PostgresPassword: " + config.postgresPassword + "\n" +
"PostgresHost: " + config.postgresHost + "\n" +
"PostgresPort: " + strconv.Itoa(config.postgresPort) + "\n" +
"PostgresDatabase: " + config.postgresDatabase + "\n" +
"CORSHosts: " + strings.Join(config.CORSHosts, ",") + "\n" +
"TrustedProxies: " + strings.Join(config.TrustedProxies, ",") + "\n" +
"MetricsPort: " + strconv.Itoa(config.MetricsPort) + "\n"
}
1 change: 0 additions & 1 deletion internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ func TestNoop(t *testing.T) {
if conf.Debug != true {
t.Error("Debug should be true")
}
t.Log(conf.ToString())
}

0 comments on commit 77ee705

Please sign in to comment.