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
Pros:
Really flexible and can use all the features of the library
Cons:
We'll need to save all the env final values and do a second pass with all the interpolate after all the envs has been replated with their values, so, the performance of the library will suffer a little bit.
Do not implement and just use replace_env_vars
The text was updated successfully, but these errors were encountered:
Sometimes you don't want just the variable in your config value, maybe you want it to be interpolated in a string, for example:
Some ideas about how to implement this, let me know which one you think it's the best one:
{:system, "MY_HOST", interpolate: "http://${ENV}/wat"}
Pros:
Easy to implement
All the options of this library
Cons:
Not flexible, you can only use one env variable
{:system, "http://${MY_HOST}/wat", interpolate: true}
Pros:
Easy to read
Cons:
Not as easy to implement.
It's the same as replace_env_vars.
Lose all the flexibility of the library
{:system, "MY_HOST", interpolate: "http://${MY_HOST}/wat"}
This would allow to do things like:
Pros:
Really flexible and can use all the features of the library
Cons:
We'll need to save all the env final values and do a second pass with all the interpolate after all the envs has been replated with their values, so, the performance of the library will suffer a little bit.
The text was updated successfully, but these errors were encountered: