We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80dfcb8 commit 6ad74e9Copy full SHA for 6ad74e9
src/main.rs
@@ -11,10 +11,17 @@ fn main() {
11
} else {
12
println!("Hello, world!");
13
}
14
+ // read remaining env vars other than NAME
15
+ for item in dotenvy::dotenv_iter().unwrap() {
16
+ let (key, value) = item.unwrap();
17
+ if key != "NAME" {
18
+ println!("{}: {}", key, value);
19
+ }
20
21
},
22
Err(_) => {
- // If .env file could not be loaded or vars don't match, print "Hello, world!"
- println!("Hello, world!");
23
+ // If .env file could not be loaded or vars don't match, print to stderr
24
+ eprintln!("Error reading env vars!");
25
26
27
0 commit comments