wip correctly parse config

This commit is contained in:
A.Unger
2020-10-09 11:24:04 +02:00
parent f2d560ff0f
commit 8fe3ac9b33
4 changed files with 15 additions and 17 deletions
+7 -7
View File
@@ -8,13 +8,6 @@ import (
// RootWithConfig applies cfg to the root flagset
func RootWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "config-file",
Value: "",
Usage: "Path to config file",
EnvVars: []string{"PROXY_CONFIG_FILE"},
Destination: &cfg.File,
},
&cli.StringFlag{
Name: "log-level",
Value: "info",
@@ -55,6 +48,13 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
// ServerWithConfig applies cfg to the root flagset
func ServerWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "config-file",
Value: "",
Usage: "Path to config file",
EnvVars: []string{"PROXY_CONFIG_FILE"},
Destination: &cfg.File,
},
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",