sort out flags precedence

This commit is contained in:
A.Unger
2021-11-09 17:30:31 +01:00
parent 713c0bb3d2
commit 51bee0e531
18 changed files with 123 additions and 147 deletions
+8 -8
View File
@@ -13,35 +13,35 @@ func StructMappings(cfg *Config) []shared.EnvBinding {
func structMappings(cfg *Config) []shared.EnvBinding {
return []shared.EnvBinding{
{
EnvVars: []string{"STORE_LOG_LEVEL", "OCIS_LOG_LEVEL"},
EnvVars: []string{"OCIS_LOG_LEVEL", "STORE_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
{
EnvVars: []string{"STORE_LOG_PRETTY", "OCIS_LOG_PRETTY"},
EnvVars: []string{"OCIS_LOG_PRETTY", "STORE_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
{
EnvVars: []string{"STORE_LOG_COLOR", "OCIS_LOG_COLOR"},
EnvVars: []string{"OCIS_LOG_COLOR", "STORE_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
{
EnvVars: []string{"STORE_LOG_FILE", "OCIS_LOG_FILE"},
EnvVars: []string{"OCIS_LOG_FILE", "STORE_LOG_FILE"},
Destination: &cfg.Log.File,
},
{
EnvVars: []string{"STORE_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
EnvVars: []string{"OCIS_TRACING_ENABLED", "STORE_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
{
EnvVars: []string{"STORE_TRACING_TYPE", "OCIS_TRACING_TYPE"},
EnvVars: []string{"OCIS_TRACING_TYPE", "STORE_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
{
EnvVars: []string{"STORE_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "STORE_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
{
EnvVars: []string{"STORE_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "STORE_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
{