sort out flags precedence
This commit is contained in:
@@ -13,15 +13,15 @@ func StructMappings(cfg *Config) []shared.EnvBinding {
|
||||
func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
return []shared.EnvBinding{
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_LOG_LEVEL", "OCIS_LOG_LEVEL"},
|
||||
EnvVars: []string{"OCIS_LOG_LEVEL", "SETTINGS_LOG_LEVEL"},
|
||||
Destination: &cfg.Log.Level,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_LOG_PRETTY", "OCIS_LOG_PRETTY"},
|
||||
EnvVars: []string{"OCIS_LOG_PRETTY", "SETTINGS_LOG_PRETTY"},
|
||||
Destination: &cfg.Log.Pretty,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_LOG_COLOR", "OCIS_LOG_COLOR"},
|
||||
EnvVars: []string{"OCIS_LOG_COLOR", "SETTINGS_LOG_COLOR"},
|
||||
Destination: &cfg.Log.Color,
|
||||
},
|
||||
{
|
||||
@@ -29,19 +29,19 @@ func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
Destination: &cfg.File,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
|
||||
EnvVars: []string{"OCIS_TRACING_ENABLED", "SETTINGS_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_TRACING_TYPE", "OCIS_TRACING_TYPE"},
|
||||
EnvVars: []string{"OCIS_TRACING_TYPE", "SETTINGS_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
|
||||
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "SETTINGS_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
|
||||
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "SETTINGS_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
{
|
||||
@@ -101,7 +101,7 @@ func structMappings(cfg *Config) []shared.EnvBinding {
|
||||
Destination: &cfg.Service.DataPath,
|
||||
},
|
||||
{
|
||||
EnvVars: []string{"SETTINGS_JWT_SECRET", "OCIS_JWT_SECRET"},
|
||||
EnvVars: []string{"OCIS_JWT_SECRET", "SETTINGS_JWT_SECRET"},
|
||||
Destination: &cfg.TokenManager.JWTSecret,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user