v0.0.287 fix bug in confext::ApplyEnvOverrides if a struct env key exists in the os.env
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s

This commit is contained in:
Mike Schwörer 2023-10-12 10:02:42 +02:00
parent da41ec3e84
commit 07cbcf5a0a
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 7 additions and 10 deletions

View File

@ -41,13 +41,13 @@ func processEnvOverrides(rval reflect.Value, delim string, prefix string) error
continue continue
} }
if rvfield.Kind() == reflect.Struct {
envkey, found := rsfield.Tag.Lookup("env") envkey, found := rsfield.Tag.Lookup("env")
if !found || envkey == "-" { if !found || envkey == "-" {
continue continue
} }
if rvfield.Kind() == reflect.Struct && rvfield.Type() != reflect.TypeOf(time.UnixMilli(0)) {
subPrefix := prefix subPrefix := prefix
if envkey != "" { if envkey != "" {
subPrefix = subPrefix + envkey + delim subPrefix = subPrefix + envkey + delim
@ -57,10 +57,7 @@ func processEnvOverrides(rval reflect.Value, delim string, prefix string) error
if err != nil { if err != nil {
return err return err
} }
}
envkey := rsfield.Tag.Get("env")
if envkey == "" || envkey == "-" {
continue continue
} }

View File

@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.286" const GoextVersion = "0.0.287"
const GoextVersionTimestamp = "2023-10-11T11:27:18+0200" const GoextVersionTimestamp = "2023-10-12T10:02:42+0200"