2
2
## DotEnv file (.env) support for Delphi
3
3
4
4
- Add DotEnv file support by including ` radDotEnv.pas ` in your project
5
- - Optional ` dotenv ` singleton variable created at startup (disabled by default)
5
+ - ` DotEnv ` singleton variable created at startup (option can be disabled)
6
+ - Simple add the radDotEnv unit to your uses clause and use ` DotEnv.Get('VariableName') `
6
7
- Fully complies with DotEnv Draft RFC: https://github.com/radprogrammer/dotenv-RFC
7
- - No exceptions are raised on parsing issues to prevent difficult to debug application startup issues
8
+ - No exceptions are raised on parsing issues to prevent difficult to debug application startup issues (a logging hook is available)
8
9
- Custom paths can be searched (only the directory of the application is searched by default)
9
10
- Custom filenames can be used (utilizes ` .env ` by default)
10
11
- Custom file encoding can be specified (defaults to UTF8 by default)
15
16
- ` KEY= Unquoted Values are trimmed ` Value=` Unquoted Values are trimmed `
16
17
- ` # full line comments supported `
17
18
- ` KEY=TEXT #inline comments supported ` Value=` TEXT `
18
- - ` KEY=TEXT#also inline comment (no space required) ` Value=` TEXT `
19
+ - ` KEY=TEXT#also inline comment (no space required) ` Value=` TEXT ` (see [ Open Issue 12 ] ( https://github.com/radprogrammer/rad-dotenv/issues/12 ) )
19
20
- ` KEY="DoubleQuoted" ` Value=` DoubleQuoted `
20
21
- ` KEY='SingleQuoted' ` Value=` SingleQuoted `
21
22
- ` KEY TEXT improperly formatted lines are ignored `
@@ -35,7 +36,7 @@ KEY2="ValueFromKey1=${KEY1}" # Value=ValueFromKey1=VALUE1
35
36
````
36
37
KEY="Value${UnknownKey-123}" # Value=Value123
37
38
````
38
- - Available option to support variable substitution in Unquoted values
39
+ - Available option to support variable substitution within Unquoted values (option is disabled by default)
39
40
````
40
41
KEY1=VALUE1
41
42
KEY2=ValueFromKey1=${KEY1} # Value=ValueFromKey1=VALUE1
0 commit comments