arkoniak / configenv.jl Goto Github PK
View Code? Open in Web Editor NEWPackage for populating ENVironment variables.
License: Other
Package for populating ENVironment variables.
License: Other
It looks unreasonable to keep trailing spaces in variable value, taking into account the fact that we remove extra spaces on the left.
So, for variables like this:
foo = abc
foo
should be equal to abc
, not abc
. If someone requires this extra space, then he should use quotes:
foo = "abc "
Make possible to use template variables
#.env
FOO=ABC
BAR=ZXC${FOO}
Second should be resolved at the read time to BAR=ZXCABC
It should check for cycling dependencies and left them unresolved.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
Current implementation of parse
/dotenv
is suboptimal. It returns Dict
, but it should return EnvProxyDict
. Also parse
accepts String
and IO
, but dotenv
not.
It should be all brought to a common denominator:
parse
should return EnvProxyDict
dotenv
should accept all possible inputs.Since it looks like other languages provide non overwriting version of dotenv
function it make sense to have something like that without resorting to constantly use overwrite=false
argument.
Proposal:
dotenv() # default is to load with overwrite
dotenvx() # default is to load without overwrite
In docs:
Add documentation
dotenvx
merge
features.isresolved
and unresolved_keys
IO
data load from the webRemove documentation
parse
function. It is part of internal implementation and should not be visible/recommended to use. May be add its description later as a part of contribution guide.In README.md:
parse
function description.Proxy dictionaries should have the ability to merge together. I think, *
sign is the best operation, since order matters
cfg1 = dotenv(".env1")
cfg2 = dotenv(".env2")
cfg = cfg1 * cfg2
Or even
cfg = maprrduce(dotenv, *, [".env1", ".env2"])
It can be also part of dotenv
function
cfg = dotenv(".env1", ".env2")
cfg = dotenv([".env1", "env2"])
Second version can be supported through the multiple dispatch on Vector, and first one through splatting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.