You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type config struct {
Home string `env:"MY_HOME" envDefault:"/tmp"`
TempFolder string `env:"TEMP_FOLDER,expand" envDefault:"${MY_HOME}/temp"`
}
and there are no environment variables when you start the process. It would still be nice if you had an option to get Home: "/tmp" and TempFolder: "/tmp/temp", wouldn't it? I mean, we did specify what the defaults are :)
If expand shouldn't be used like that, maybe expandWithDefaults could be.
Cheers!
The text was updated successfully, but these errors were encountered:
Hi,
for example, if you have the following struct
and there are no environment variables when you start the process. It would still be nice if you had an option to get
Home: "/tmp"
andTempFolder: "/tmp/temp"
, wouldn't it? I mean, we did specify what the defaults are :)If
expand
shouldn't be used like that, maybeexpandWithDefaults
could be.Cheers!
The text was updated successfully, but these errors were encountered: