Skip to content

Commit

Permalink
for loop over range is a copy, need to copy back
Browse files Browse the repository at this point in the history
  • Loading branch information
b-dean committed Jan 29, 2024
1 parent 9980481 commit 82eaef1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ func (c Config) FromEnv() error {
for flag, ce := range c {
if value, ok := os.LookupEnv(ce.Env); ok {
ce.Value = value
c[flag] = ce
}

if ce.Value == "" {
if c[flag].Value == "" {
result = multierror.Append(result, fmt.Errorf("environment value is empty, name: %s", flag))
}
}
Expand Down

0 comments on commit 82eaef1

Please sign in to comment.