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
When doing something like env:"OVERRIDE_PORT,default=$DEFAULT_PORT", you would expect the default value to be the environment variable you get when running echo $DEFAULT_PORT in your terminal. However, it uses the same prefix as the field it's on. So, if OVERRIDE_PORT has a prefix of MY_PREFIX, the default that would be used would actually be MY_PREFIX_DEFAULT_PORT.
My specific use case where this is a problem is when I'm trying to deprecate old environment variables. I have a deprecated variable called FEATURE_DISABLEBUS, and I want to replace this with BUS_CONTROLLER_ENABLED. The new variable lives in a BusControllerConfig struct with a prefix of BUS_CONTROLLER. However, if I try to default to the deprecated variable, it tries to use BUS_CONTROLLER_FEATURE_DISABLEBUS.
The text was updated successfully, but these errors were encountered:
When doing something like
env:"OVERRIDE_PORT,default=$DEFAULT_PORT"
, you would expect the default value to be the environment variable you get when runningecho $DEFAULT_PORT
in your terminal. However, it uses the same prefix as the field it's on. So, ifOVERRIDE_PORT
has a prefix ofMY_PREFIX
, the default that would be used would actually beMY_PREFIX_DEFAULT_PORT
.My specific use case where this is a problem is when I'm trying to deprecate old environment variables. I have a deprecated variable called
FEATURE_DISABLEBUS
, and I want to replace this withBUS_CONTROLLER_ENABLED
. The new variable lives in aBusControllerConfig
struct with a prefix ofBUS_CONTROLLER
. However, if I try to default to the deprecated variable, it tries to useBUS_CONTROLLER_FEATURE_DISABLEBUS
.The text was updated successfully, but these errors were encountered: