Crell / EnvMapper

Easily map environment variables into defined classed objects, ready for Dependency Injection.
GNU Lesser General Public License v3.0
83 stars 3 forks source link

Allow falsy default values to be set #5

Closed SpadXIII closed 1 year ago

SpadXIII commented 1 year ago

Fixes https://github.com/Crell/EnvMapper/issues/4

Crell commented 1 year ago

Hm. I'm a little concerned about the double method call with the has() and get(). I think it would be faster/better to use a out-of-type sentinel value instead, via an Enum. (As described here: https://peakd.com/hive-168588/@crell/much-ado-about-null)

That may not be clear without an example so I'll see if I can find time to add a commit or two that does that.

Crell commented 1 year ago

There we go. Thanks!