v0.0.91
This commit is contained in:
parent
ee325f67fd
commit
62acddda5e
@ -22,10 +22,10 @@ import (
|
||||
//
|
||||
// sub-structs are recursively parsed (if they have an env tag) and the env-variable keys are delimited by the delim parameter
|
||||
// sub-structs with `env:""` are also parsed, but the delimited is skipped (they are handled as if they were one level higher)
|
||||
func ApplyEnvOverrides[T any](c *T, delim string) error {
|
||||
func ApplyEnvOverrides[T any](prefix string, c *T, delim string) error {
|
||||
rval := reflect.ValueOf(c).Elem()
|
||||
|
||||
return processEnvOverrides(rval, delim, "")
|
||||
return processEnvOverrides(rval, delim, prefix)
|
||||
}
|
||||
|
||||
func processEnvOverrides(rval reflect.Value, delim string, prefix string) error {
|
||||
|
Loading…
Reference in New Issue
Block a user