diff --git a/internal/config/config.go b/internal/config/config.go index ab71026..520689a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -15,6 +15,7 @@ type Config struct { SMTP SMTPConfig App AppConfig RateLimit RateLimitConfig + CLI CLIConfig LogDir string PIDDir string } @@ -81,6 +82,10 @@ type RateLimitConfig struct { TrustProxyHeaders bool } +type CLIConfig struct { + JSONOutputDefault bool +} + func Load() (*Config, error) { config := &Config{ Database: DatabaseConfig{ @@ -137,6 +142,9 @@ func Load() (*Config, error) { MetricsLimit: getEnvAsInt("RATE_LIMIT_METRICS", 20), TrustProxyHeaders: getEnvAsBool("RATE_LIMIT_TRUST_PROXY", false), }, + CLI: CLIConfig{ + JSONOutputDefault: getEnvAsBool("CLI_JSON_OUTPUT", false), + }, LogDir: getEnv("LOG_DIR", "/var/log/"), PIDDir: getEnv("PID_DIR", "/run"), }