mirror of
https://github.com/Luzifer/promcertcheck.git
synced 2024-11-09 16:30:04 +00:00
Support configuration through ENV vars
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
38fc7fa196
commit
eba5ffe815
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
@ -37,7 +37,8 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if err := rconfig.Parse(&cfg); err != nil {
|
rconfig.AutoEnv(true)
|
||||||
|
if err := rconfig.ParseAndValidate(&cfg); err != nil {
|
||||||
log.Fatalf("Unable to parse CLI parameters: %s", err)
|
log.Fatalf("Unable to parse CLI parameters: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue