chore: cosmetic documentation fixes
This commit is contained in:
parent
3397750f23
commit
e8bedffbdd
5 changed files with 18 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,6 @@
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
/target
|
/target
|
||||||
/itconfig-tests/target
|
/itconfig-tests/target
|
||||||
|
|
|
@ -85,7 +85,8 @@ config! {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main () {
|
fn main () {
|
||||||
// dotenv().ok();
|
// dotenv().expect("dotenv setup to be successful");
|
||||||
|
// or
|
||||||
env::set_var("FEATURE_NEW_MENU", "t");
|
env::set_var("FEATURE_NEW_MENU", "t");
|
||||||
|
|
||||||
config::init();
|
config::init();
|
||||||
|
@ -96,9 +97,7 @@ fn main () {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Macro is an optional feature, disabled by default. You can use this library without macro
|
||||||
Macro is an optional feature, enabled by default. You can install itconfig without default
|
|
||||||
features and use this lib as shown below
|
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use itconfig::*;
|
use itconfig::*;
|
||||||
|
@ -106,6 +105,8 @@ use std::env;
|
||||||
// use dotenv::dotenv;
|
// use dotenv::dotenv;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
// dotenv().expect("dotenv setup to be successful");
|
||||||
|
// or
|
||||||
env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
|
env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
|
||||||
|
|
||||||
let database_url = get_env::<String>("DATABASE_URL").unwrap();
|
let database_url = get_env::<String>("DATABASE_URL").unwrap();
|
||||||
|
|
|
@ -15,7 +15,7 @@ config! {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
dotenv().ok();
|
dotenv().expect("dotenv setup to be successful");
|
||||||
config::init();
|
config::init();
|
||||||
|
|
||||||
let connection = db::establish_connection();
|
let connection = db::establish_connection();
|
||||||
|
|
|
@ -72,7 +72,8 @@ config! {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main () {
|
fn main () {
|
||||||
// dotenv().ok();
|
// dotenv().expect("dotenv setup to be successful");
|
||||||
|
// or
|
||||||
env::set_var("FEATURE_NEW_MENU", "t");
|
env::set_var("FEATURE_NEW_MENU", "t");
|
||||||
|
|
||||||
config::init();
|
config::init();
|
||||||
|
@ -84,8 +85,7 @@ fn main () {
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Macro is an optional feature, enabled by default. You can install itconfig without default
|
Macro is an optional feature, disabled by default. You can use this library without macro
|
||||||
features and use this lib as shown below
|
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use itconfig::*;
|
use itconfig::*;
|
||||||
|
@ -93,6 +93,8 @@ use std::env;
|
||||||
// use dotenv::dotenv;
|
// use dotenv::dotenv;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
// dotenv().expect("dotenv setup to be successful");
|
||||||
|
// or
|
||||||
env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
|
env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
|
||||||
|
|
||||||
let database_url = get_env::<String>("DATABASE_URL").unwrap();
|
let database_url = get_env::<String>("DATABASE_URL").unwrap();
|
||||||
|
|
|
@ -78,7 +78,8 @@
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! fn main () {
|
//! fn main () {
|
||||||
//! // dotenv().ok();
|
//! // dotenv().expect("dotenv setup to be successful");
|
||||||
|
//! // or
|
||||||
//! env::set_var("FEATURE_NEW_MENU", "t");
|
//! env::set_var("FEATURE_NEW_MENU", "t");
|
||||||
//!
|
//!
|
||||||
//! config::init();
|
//! config::init();
|
||||||
|
@ -90,8 +91,7 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! Macro is an optional feature, enabled by default. You can install itconfig without default
|
//! Macro is an optional feature, disabled by default. You can use this library without macro.
|
||||||
//! features and use this lib as shown below
|
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use itconfig::*;
|
//! use itconfig::*;
|
||||||
|
@ -99,6 +99,8 @@
|
||||||
//! // use dotenv::dotenv;
|
//! // use dotenv::dotenv;
|
||||||
//!
|
//!
|
||||||
//! fn main() {
|
//! fn main() {
|
||||||
|
//! // dotenv().expect("dotenv setup to be successful");
|
||||||
|
//! // or
|
||||||
//! env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
|
//! env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
|
||||||
//!
|
//!
|
||||||
//! let database_url = get_env::<String>("DATABASE_URL").unwrap();
|
//! let database_url = get_env::<String>("DATABASE_URL").unwrap();
|
||||||
|
|
Reference in a new issue