Use TOML output for -print-config instead of JSON.

This is much easier to read, and can be used as a template for
a new configuration.
This commit is contained in:
Catherine
2025-12-07 05:43:00 +00:00
parent b58fe54c50
commit 3840ba3c98
2 changed files with 3 additions and 3 deletions

View File

@@ -166,8 +166,8 @@ type ObservabilityConfig struct {
SlowResponseThreshold Duration `toml:"slow-response-threshold" default:"500ms"`
}
func (config *Config) DebugJSON() string {
result, err := json.MarshalIndent(config, "", " ")
func (config *Config) TOML() string {
result, err := toml.Marshal(config)
if err != nil {
panic(err)
}

View File

@@ -269,7 +269,7 @@ func Main() {
}
if *printConfig {
fmt.Println(config.DebugJSON())
fmt.Println(config.TOML())
return
}