Skip to content

Commit 113fce1

Browse files
committed
Fix panic in env config loader for non-string attribute types
Use SetS instead of Set to properly convert string env var values to the target type (int, bool, etc.) before assignment. Co-authored-by: Isaac
1 parent c7e351b commit 113fce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/env/loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (le *configLoader) Configure(cfg *config.Config) error {
4343
if v == "" {
4444
continue
4545
}
46-
if err := a.Set(cfg, v); err != nil {
46+
if err := a.SetS(cfg, v); err != nil {
4747
return err
4848
}
4949
}

0 commit comments

Comments
 (0)