switch ocs to struct tag based env config

This commit is contained in:
Willy Kloucek
2022-01-03 07:49:23 +01:00
parent a35c472be3
commit d0030ab555
18 changed files with 101 additions and 193 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
}
// merge environment variable config on top of the current config
if err := mergo.Merge(cfg, envCfg, mergo.WithOverride); err != nil {
if err := mergo.Merge(cfg, envCfg, mergo.WithOverride); err != nil && err.Error() != "none of the target fields were set from environment variables" {
return err
}