Skip to content

Commit

Permalink
Hello, dotenvy!
Browse files Browse the repository at this point in the history
  • Loading branch information
simnalamburt committed Oct 11, 2024
1 parent b6f3b98 commit 70c0e3c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ version = "0.1.0"
edition = "2021"

[dependencies]
dotenvy = { git = "https://github.com/allan2/dotenvy.git", version = "0.15.7" }
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
use dotenvy::{EnvLoader, EnvSequence};

fn main() {
EnvLoader::new().sequence(EnvSequence::EnvOnly).load().unwrap(); // Not panics
EnvLoader::new().sequence(EnvSequence::EnvThenInput).load().unwrap(); // Panics
EnvLoader::new().sequence(EnvSequence::InputThenEnv).load().unwrap(); // Panics
EnvLoader::new().sequence(EnvSequence::InputOnly).load().unwrap(); // Panics
println!("Hello, world!");
}

0 comments on commit 70c0e3c

Please sign in to comment.