Skip to content

Commit

Permalink
fix: Tabs in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-leinz committed Jul 30, 2024
1 parent 3525643 commit 6e34aef
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ the configuration, which can be invoked with the following:
use freedom_config::{Config, Test};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = Config::builder()
.environment(Test)
.key("my_key")
.secret("my_secret")
.build()?;

println!("{:?}", config);

Ok(())
let config = Config::builder()
.environment(Test)
.key("my_key")
.secret("my_secret")
.build()?;

println!("{:?}", config);
Ok(())
}
```

Expand All @@ -29,19 +28,19 @@ The builder can also be used to source these items from the environment:
use freedom_config::Config;

fn main() -> Result<(), Box<dyn std::error::Error>> {
std::env::set_var(Config::ATLAS_ENV_VAR, "Test");
std::env::set_var(Config::ATLAS_KEY_VAR, "my_key");
std::env::set_var(Config::ATLAS_SECRET_VAR, "my_secret");

let config = Config::builder()
.environment_from_env()?
.key_from_env()?
.secret_from_env()?
.build()?;
println!("{:?}", config);
Ok(())
std::env::set_var(Config::ATLAS_ENV_VAR, "Test");
std::env::set_var(Config::ATLAS_KEY_VAR, "my_key");
std::env::set_var(Config::ATLAS_SECRET_VAR, "my_secret");

let config = Config::builder()
.environment_from_env()?
.key_from_env()?
.secret_from_env()?
.build()?;
println!("{:?}", config);
Ok(())
}
```

Expand All @@ -52,6 +51,6 @@ config entirely from environment variables
use freedom_config::Config;

fn main() {
let config = Config::from_env();
let config = Config::from_env();
}
```

0 comments on commit 6e34aef

Please sign in to comment.