new config framework in proxy

This commit is contained in:
A.Unger
2021-11-08 13:32:58 +01:00
parent 8c2a681937
commit 2dd9a7b14c
5 changed files with 49 additions and 46 deletions
+3 -6
View File
@@ -62,7 +62,7 @@ func NewLogger(cfg *config.Config) log.Logger {
)
}
// ParseConfig loads ocis configuration from known paths.
// ParseConfig loads ocis configuration.
func ParseConfig(c *cli.Context, cfg *config.Config) error {
conf, err := ociscfg.BindSourcesToStructs("ocis", cfg)
if err != nil {
@@ -71,9 +71,6 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
conf.LoadOSEnv(config.GetEnv(), false)
if err = cfg.UnmapEnv(conf); err != nil {
return err
}
return nil
bindings := config.StructMappings(cfg)
return ociscfg.BindEnv(conf, bindings)
}