add support for sourcing flags from ENV vars

This commit is contained in:
Joel Wetzell
2026-03-23 20:39:02 -05:00
parent 1361e16b28
commit 204ccab683

View File

@@ -41,6 +41,7 @@ func main() {
Name: "config",
Value: "./config.yaml",
Usage: "path to config file",
Sources: cli.EnvVars("SHOWBRIDGE_CONFIG"),
},
&cli.StringFlag{
Name: "log-level",
@@ -53,6 +54,7 @@ func main() {
}
return nil
},
Sources: cli.EnvVars("SHOWBRIDGE_LOG_LEVEL"),
},
&cli.StringFlag{
Name: "log-format",
@@ -65,11 +67,13 @@ func main() {
}
return nil
},
Sources: cli.EnvVars("SHOWBRIDGE_LOG_FORMAT"),
},
&cli.BoolFlag{
Name: "trace",
Value: false,
Usage: "enable OpenTelemetry tracing",
Sources: cli.EnvVars("SHOWBRIDGE_TRACE"),
},
},
Action: run,