@@ -48,14 +48,14 @@ func main() {
49 opts := NewOptions()
49 opts := NewOptions()
51− var cfg map[string]interface{}
51+ cfg := make(EnvOptions)
52 if *config != "" {
52 if *config != "" {
53 _, err := toml.DecodeFile(*config, &cfg)
53 _, err := toml.DecodeFile(*config, &cfg)
54 if err != nil {
54 if err != nil {
55 log.Fatalf("ERROR: failed to load config file %s - %s", *config, err)
55 log.Fatalf("ERROR: failed to load config file %s - %s", *config, err)
58− LoadOptionsFromEnv(opts, cfg)
58+ cfg.LoadEnvForStruct(opts)
59 options.Resolve(opts, flagSet, cfg)
59 options.Resolve(opts, flagSet, cfg)
61 err := opts.Validate()
61 err := opts.Validate()