use reflection to set config values from environment

This commit is contained in:
A.Unger
2021-11-03 11:34:56 +01:00
parent d54fc2f5b9
commit 09195ffc8c
4 changed files with 104 additions and 5 deletions
+6 -1
View File
@@ -68,7 +68,12 @@ func NewLogger(cfg *config.Config) log.Logger {
// ParseConfig loads accounts configuration from known paths.
func ParseConfig(c *cli.Context, cfg *config.Config) error {
return ociscfg.BindSourcesToStructs("accounts", cfg)
_, err := ociscfg.BindSourcesToStructs("accounts", cfg)
if err != nil {
return err
}
return nil
}
// SutureService allows for the accounts command to be embedded and supervised by a suture supervisor tree.